Documentation ¶
Index ¶
- Constants
- Variables
- func C_Login(message MPB.Message, ctx interface{})
- func C_Reconnect(message MPB.Message, ctx interface{})
- func Center_GetServerMergeName(svr0 string) string
- func Center_GetServerUserLimit(svr0 string) int32
- func DatabaseOpen()
- func GS_Kick(message MPB.Message, ctx interface{})
- func InitSession()
- func SetDefaults(input interface{})
- type Handlers
- func (e *Handlers) ActCalendarChange(ctx context.Context, in *MPB.GS_ActCalendarChange, out *MPB.Response) error
- func (e *Handlers) ActConfChange(ctx context.Context, in *MPB.GS_ActConfChange, out *MPB.Response) error
- func (e *Handlers) ActStageChange(ctx context.Context, in *MPB.GS_ActStageChange, out *MPB.Response) error
- func (e *Handlers) GetRank(ctx context.Context, in *MPB.C_GetRank, out *MPB.GS_GetRank_R) error
- func (e *Handlers) MailChange(ctx context.Context, in *MPB.GS_MailChange, out *MPB.Response) error
- func (e *Handlers) MailDel(ctx context.Context, in *MPB.GS_MailDel, out *MPB.Response) error
- func (e *Handlers) MailNew(ctx context.Context, in *MPB.GS_MailNew, out *MPB.Response) error
- type Rc4
- type Session
- func (self *Session) BeginAuth() bool
- func (self *Session) Close()
- func (self *Session) Dispatch(p packet.Packet)
- func (self *Session) EndAuth()
- func (self *Session) GetIP() string
- func (self *Session) GetId() uint64
- func (self *Session) LoginPlayer(m *MPB.GW_UserOnline)
- func (self *Session) LogoutPlayer()
- func (self *Session) ReconnectPlayer(old uint64, m *MPB.GW_UserReconnect) MPB.RetType
- func (self *Session) SendMsg(message MPB.Message)
- func (self *Session) SendPacket(p packet.Packet)
- func (self *Session) SetForceRemove()
- type UserInfo
Constants ¶
View Source
const ( C_max_session_count = 10000 C_heart_beat_timeout = 20 * 60 * 1000 //millisecond C_session_timeout = 2 * 60 C_session_timeout_tick = 10 )
View Source
const ( SessionState_None = iota SessionState_Authenticating SessionState_LoggedIn )
View Source
const ( // center C_tabname_svrlist = "svrlist" C_tabname_userinfo = "userinfo" C_tabname_names = "names" )
View Source
const (
C_player_name_maxlen = 18
)
Variables ¶
View Source
var NetMgr = &netmgr_t{ sessions: make(map[uint64]*Session), connectq: tcp.NewConnectQ(), }
Functions ¶
func C_Reconnect ¶
func C_Reconnect(message MPB.Message, ctx interface{})
func Center_GetServerMergeName ¶ added in v1.1.1
func Center_GetServerUserLimit ¶ added in v1.1.1
func DatabaseOpen ¶ added in v1.1.1
func DatabaseOpen()
func InitSession ¶
func InitSession()
func SetDefaults ¶ added in v1.1.1
func SetDefaults(input interface{})
Types ¶
type Handlers ¶ added in v1.1.1
type Handlers struct{}
func (*Handlers) ActCalendarChange ¶ added in v1.1.1
func (*Handlers) ActConfChange ¶ added in v1.1.1
func (*Handlers) ActStageChange ¶ added in v1.1.1
func (*Handlers) MailChange ¶ added in v1.1.1
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) LoginPlayer ¶
func (self *Session) LoginPlayer(m *MPB.GW_UserOnline)
func (*Session) LogoutPlayer ¶
func (self *Session) LogoutPlayer()
func (*Session) ReconnectPlayer ¶
func (*Session) SendPacket ¶
func (*Session) SetForceRemove ¶
func (self *Session) SetForceRemove()
type UserInfo ¶ added in v1.1.1
type UserInfo struct { UserId uint64 `bson:"_id"` AuthId string `bson:"authid"` Svr0 string `bson:"svr0"` Svr string `bson:"svr"` Sdk string `bson:"sdk"` Plat string `bson:"plat"` DevId string `bson:"devid"` IP string `bson:"ip"` CreateTs time.Time `bson:"cts"` BanTs time.Time `bson:"ban_ts"` Name string `bson:"name"` Lv int32 `bson:"lv"` Vip int32 `bson:"vip"` Tutorial int32 `bson:"tut"` }
func Center_GetUserInfo ¶ added in v1.1.1
func Center_GetUserInfoById ¶ added in v1.1.1
Click to show internal directories.
Click to hide internal directories.