1
This commit is contained in:
parent
f4e5dfd266
commit
1dcd9afe59
@ -12,8 +12,8 @@ type HandlerMgr struct {
|
|||||||
|
|
||||||
func (this *HandlerMgr) Init() {
|
func (this *HandlerMgr) Init() {
|
||||||
ss.RegHandlerId(int(ss.SSMessageIdE__SS_Ping), constant.WSP_LISTENER_HANDLER_ID)
|
ss.RegHandlerId(int(ss.SSMessageIdE__SS_Ping), constant.WSP_LISTENER_HANDLER_ID)
|
||||||
ss.RegHandlerId(int(ss.SSMessageIdE__SS_WSP_SocketDisconnect), constant.WSP_LISTENER_HANDLER_ID)
|
|
||||||
|
|
||||||
|
ss.RegHandlerId(int(ss.SSMessageIdE__SS_WSP_SocketDisconnect), constant.PLAYER_MGR_HANDLER_ID)
|
||||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMPing), constant.PLAYER_MGR_HANDLER_ID)
|
cs.RegHandlerId(int(cs.CMMessageIdE__CMPing), constant.PLAYER_MGR_HANDLER_ID)
|
||||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMLogin), constant.PLAYER_MGR_HANDLER_ID)
|
cs.RegHandlerId(int(cs.CMMessageIdE__CMLogin), constant.PLAYER_MGR_HANDLER_ID)
|
||||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMReconnect), constant.PLAYER_MGR_HANDLER_ID)
|
cs.RegHandlerId(int(cs.CMMessageIdE__CMReconnect), constant.PLAYER_MGR_HANDLER_ID)
|
||||||
|
@ -27,7 +27,7 @@ func (this *WSPListener) Init() {
|
|||||||
listener, err := net.Listen("tcp", "0.0.0.0:"+
|
listener, err := net.Listen("tcp", "0.0.0.0:"+
|
||||||
q5.ToString(mt.Table.HallCluster.GetListenPort()))
|
q5.ToString(mt.Table.HallCluster.GetListenPort()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
} else {
|
} else {
|
||||||
this.listener = listener
|
this.listener = listener
|
||||||
go this.parseNetPkt()
|
go this.parseNetPkt()
|
||||||
@ -39,9 +39,8 @@ func (this *WSPListener) UnInit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *WSPListener) SS_ping(hdr *f5.MsgHdr, msg *ss.SS_Ping) {
|
func (this *WSPListener) SS_ping(hdr *f5.MsgHdr, msg *ss.SS_Ping) {
|
||||||
}
|
rspMsg := ss.SS_Pong{}
|
||||||
|
this.SendProxyMsg(hdr.Conn, 0, &rspMsg)
|
||||||
func (this *WSPListener) SS_WSP_SocketDisconnect(hdr *f5.MsgHdr, msg *ss.SS_WSP_SocketDisconnect) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WSPListener) accept() {
|
func (this *WSPListener) accept() {
|
||||||
|
@ -28,7 +28,6 @@ func (this *player) GetRoom() *common.Room {
|
|||||||
return this.room
|
return this.room
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (this *player) init(req *pendingLoginRequest){
|
func (this *player) init(req *pendingLoginRequest){
|
||||||
this.socket = req.hdr.GetSocket()
|
this.socket = req.hdr.GetSocket()
|
||||||
this.accountId = req.msg.GetAccountId()
|
this.accountId = req.msg.GetAccountId()
|
||||||
|
@ -2,6 +2,7 @@ package player
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"cs"
|
"cs"
|
||||||
|
"ss"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"f5"
|
"f5"
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -223,3 +224,6 @@ func (this *playerMgr) genSeqId() *int64 {
|
|||||||
reqId := this.currReqId
|
reqId := this.currReqId
|
||||||
return &reqId
|
return &reqId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *playerMgr) SS_WSP_SocketDisconnect(hdr *f5.MsgHdr, msg *ss.SS_WSP_SocketDisconnect) {
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user