app

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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
)

Variables

View Source
var NetMgr = &netmgr_t{
	sessions: make(map[uint64]*Session),
	connectq: tcp.NewConnectQ(),
}

Functions

func C_Login

func C_Login(message PB.Message, ctx interface{})

func C_Reconnect

func C_Reconnect(message PB.Message, ctx interface{})

func GS_Kick

func GS_Kick(message PB.Message, ctx interface{})

func InitSession

func InitSession()

Types

type Rc4

type Rc4 rc4.Cipher

func NewRc4

func NewRc4() *Rc4

func (*Rc4) Decrypt

func (self *Rc4) Decrypt(dst, src []byte)

func (*Rc4) Encrypt

func (self *Rc4) Encrypt(dst, src []byte)

type Session

type Session struct {
	// contains filtered or unexported fields
}

func (*Session) BeginAuth

func (self *Session) BeginAuth() bool

func (*Session) Close

func (self *Session) Close()

func (*Session) Dispatch

func (self *Session) Dispatch(p packet.Packet)

func (*Session) EndAuth

func (self *Session) EndAuth()

func (*Session) GetIP

func (self *Session) GetIP() string

func (*Session) GetId

func (self *Session) GetId() uint64

func (*Session) LoginPlayer

func (self *Session) LoginPlayer(m *PB.GW_UserOnline)

func (*Session) LogoutPlayer

func (self *Session) LogoutPlayer()

func (*Session) ReconnectPlayer

func (self *Session) ReconnectPlayer(old uint64, m *PB.GW_UserReconnect) PB.RetType

func (*Session) SendMsg

func (self *Session) SendMsg(message PB.Message)

func (*Session) SendPacket

func (self *Session) SendPacket(p packet.Packet)

func (*Session) SetForceRemove

func (self *Session) SetForceRemove()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL