Documentation ¶
Index ¶
- func Get_ConnectPool_Instance() face.IConnection
- func Get_Match_Instance() face.IMatchSystem
- func Get_Server_Instance() face.IServer
- func Get_WorkerPool_Instance() face.IWorkerPool
- func NewConnectionManager() face.IConnection
- func NewMatchSystem() face.IMatchSystem
- func NewServer() face.IServer
- func NewSession(conn *kcp.UDPSession, sid uint32) face.ISession
- func NewTestStruct() face.ITest
- func NewWorkerPool() face.IWorkerPool
- func OnRoomDelete(room face.IRoom)
- func OnRoomSpawn(room face.IRoom)
- func SpawnRoom(playerSessions []face.ISession) face.IRoom
- type ConnectionManager
- func (connectionManager *ConnectionManager) AddRoom(room face.IRoom)
- func (connectionManager *ConnectionManager) AddSession(conn *kcp.UDPSession)
- func (connectionManager *ConnectionManager) DeleteRoom(roomId uint32)
- func (connectionManager *ConnectionManager) DeleteSession(sid uint32)
- func (connectionManager *ConnectionManager) GenerateUniqueSessionID() uint32
- func (connectionManager *ConnectionManager) GetRoom(roomId uint32) face.IRoom
- func (connectionManager *ConnectionManager) GetSession(sid uint32) face.ISession
- type MatchManager
- type Request
- type Server
- type Session
- func (session *Session) ChangeRoomId(roomId uint32)
- func (session *Session) CheckAlive()
- func (session *Session) GetConnection() net.Conn
- func (session *Session) GetCurrentRoomId() uint32
- func (session *Session) GetRemoteAddress() string
- func (session *Session) GetSid() uint32
- func (session *Session) SendMessage(data []byte)
- func (session *Session) Start()
- func (session *Session) StartReader()
- func (session *Session) StartWriter()
- func (session *Session) Stop()
- type TestStruct
- type WorkerPool
- func (workerPool *WorkerPool) AddToTaskQueue(request face.IRequest)
- func (workerPool *WorkerPool) DoMessageHandler(request face.IRequest)
- func (workerPool *WorkerPool) ResponseLogin(sid uint32)
- func (workerPool *WorkerPool) ResponseTest(session face.ISession)
- func (workerPool *WorkerPool) Start()
- func (workerPool *WorkerPool) StartOneWorker(workerID int, taskQueue chan face.IRequest)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get_ConnectPool_Instance ¶
func Get_ConnectPool_Instance() face.IConnection
func Get_Match_Instance ¶
func Get_Match_Instance() face.IMatchSystem
func Get_Server_Instance ¶
func Get_WorkerPool_Instance ¶
func Get_WorkerPool_Instance() face.IWorkerPool
func NewConnectionManager ¶
func NewConnectionManager() face.IConnection
func NewMatchSystem ¶
func NewMatchSystem() face.IMatchSystem
func NewSession ¶
func NewTestStruct ¶
func NewWorkerPool ¶
func NewWorkerPool() face.IWorkerPool
func OnRoomDelete ¶
func OnRoomSpawn ¶
Types ¶
type ConnectionManager ¶
type ConnectionManager struct { NewSessionSid uint32 // contains filtered or unexported fields }
func (*ConnectionManager) AddRoom ¶
func (connectionManager *ConnectionManager) AddRoom(room face.IRoom)
func (*ConnectionManager) AddSession ¶
func (connectionManager *ConnectionManager) AddSession(conn *kcp.UDPSession)
func (*ConnectionManager) DeleteRoom ¶
func (connectionManager *ConnectionManager) DeleteRoom(roomId uint32)
func (*ConnectionManager) DeleteSession ¶
func (connectionManager *ConnectionManager) DeleteSession(sid uint32)
func (*ConnectionManager) GenerateUniqueSessionID ¶
func (connectionManager *ConnectionManager) GenerateUniqueSessionID() uint32
func (*ConnectionManager) GetRoom ¶
func (connectionManager *ConnectionManager) GetRoom(roomId uint32) face.IRoom
func (*ConnectionManager) GetSession ¶
func (connectionManager *ConnectionManager) GetSession(sid uint32) face.ISession
type MatchManager ¶
type MatchManager struct {
// contains filtered or unexported fields
}
func (*MatchManager) EnterMatchQueue ¶
func (match *MatchManager) EnterMatchQueue(session face.ISession)
func (*MatchManager) GenerateNewRoom ¶
func (match *MatchManager) GenerateNewRoom()
func (*MatchManager) QuitMatchQueue ¶
func (match *MatchManager) QuitMatchQueue(session face.ISession)
func (*MatchManager) UpdateMatchQueue ¶
func (match *MatchManager) UpdateMatchQueue(message *pb.PbMessage, session face.ISession)
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶
func (*Request) GetMessage ¶
func (*Request) GetSession ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) ChangeRoomId ¶
func (*Session) CheckAlive ¶
func (session *Session) CheckAlive()
func (*Session) GetConnection ¶
func (*Session) GetCurrentRoomId ¶
func (*Session) GetRemoteAddress ¶
func (*Session) SendMessage ¶
func (*Session) StartReader ¶
func (session *Session) StartReader()
func (*Session) StartWriter ¶
func (session *Session) StartWriter()
type TestStruct ¶
type TestStruct struct {
// contains filtered or unexported fields
}
func (*TestStruct) Print ¶
func (test *TestStruct) Print()
func (*TestStruct) Test ¶
func (test *TestStruct) Test()
type WorkerPool ¶
type WorkerPool struct { WorkerPoolSize uint32 TaskQueue []chan face.IRequest // contains filtered or unexported fields }
func (*WorkerPool) AddToTaskQueue ¶
func (workerPool *WorkerPool) AddToTaskQueue(request face.IRequest)
func (*WorkerPool) DoMessageHandler ¶
func (workerPool *WorkerPool) DoMessageHandler(request face.IRequest)
func (*WorkerPool) ResponseLogin ¶
func (workerPool *WorkerPool) ResponseLogin(sid uint32)
func (*WorkerPool) ResponseTest ¶
func (workerPool *WorkerPool) ResponseTest(session face.ISession)
test
func (*WorkerPool) Start ¶
func (workerPool *WorkerPool) Start()
func (*WorkerPool) StartOneWorker ¶
func (workerPool *WorkerPool) StartOneWorker(workerID int, taskQueue chan face.IRequest)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.