账号登陆香港
包头8个字节,包体227个字节
setUserLogin
send 100_2,send data size = 235
m_pClientLoginSock->sendData(MDM_MB_LOGON,SUB_MB_LOGON_ACCOUNTS,pLogonByAccounts,sizeof(CMD_MB_LogonAccounts));
登录香港成功
wMainCmdID = 100,wSubCmdID = 100
OnSocketSubLogonSuccess
wFaceID:0
login success2! file(d:\cocos2d-x-2.2.5\projects\bjl\classes\msgdispatch\msgdispatch.cpp) line(374)
read root node error
read root node error
login success! file(d:\cocos2d-x-2.2.5\projects\bjl\classes\msgdispatch\msgdispatch.cpp) line(429)
MsgDispatch::onEventTcpLoginRead
case MDM_MB_LOGON://登录消息 100
case SUB_MB_LOGON_SUCCESS://登录成功 100
MsgDispatch::onSocketSubLogonSuccess
手机登陆香港服房间
147
send 1_2,send data size = 155
包头8个字节,包体147个字节
m_pClientGameSock->sendData(MDM_GR_LOGON, SUB_GR_LOGON_MOBILE, (void*)lm, sizeof(CMD_GR_LogonMobile));
wMainCmdID = 2,wSubCmdID = 101
case MDM_GR_CONFIG: //配置信息 2
case SUB_GR_CONFIG_SERVER: // 房间配置
wMainCmdID = 2,wSubCmdID = 103
case MDM_GR_CONFIG: //配置信息 2
case SUB_GR_CONFIG_FINISH: // 配置完成
wMainCmdID = 3,wSubCmdID = 100
case MDM_GR_USER: //用户消息 3
case SUB_GR_USER_ENTER: // 用户进入 100
用户进入
wMainCmdID = 1,wSubCmdID = 102
case MDM_GR_LOGON: //登录消息 1
case SUB_GR_LOGON_FINISH: //登陆完成
----------------------gameserver login success!-------------------------- file(d:\cocos2d-x-2.2.5\projects\bjl\classes\entity\roomframe.cpp) line(239)
RoomFrame::OnSocketSubGRLogonFinish m_bStartType=1,m_cbStatus=1
wMainCmdID = 3,wSubCmdID = 101
case MDM_GR_USER: //用户消息 3
case SUB_GR_USER_SCORE: // 用户积分 101
wMainCmdID = 3,wSubCmdID = 102
case MDM_GR_USER: //用户消息 3
case SUB_GR_USER_STATUS: // 用户状态 102
send 3_11,send data size = 12
包头8个字节,包体4个字节
m_pClientGameSock->sendData(MDM_GR_USER, SUB_GR_USER_CHAIR_INFO_REQ, info, sizeof(CMD_GR_ChairUserInfoReq));
send 100_1,send data size = 17
包头8个字节,包体9个字节
m_pClientGameSock->sendData(MDM_GF_FRAME, SUB_GF_GAME_OPTION, gameOption, sizeof(CMD_GF_GameOption));
wMainCmdID = 100,wSubCmdID = 100
OnFrameMessage
gamestatus!
RoomFrame::OnEventTcpRoomRead
case MDM_GF_FRAME: //框架命令 100
RoomFrame::OnFrameMessage
case SUB_GF_GAME_STATUS: // 游戏状态 100
wMainCmdID = 100,wSubCmdID = 200
OnFrameMessage
RoomFrame::OnEventTcpRoomRead
case MDM_GF_FRAME: //框架命令 100
RoomFrame::OnFrameMessage
case SUB_GF_SYSTEM_MESSAGE: // 系统消息 200
wMainCmdID = 200,wSubCmdID = 106
SUB_S_CHEAT_CARD
75
5
RoomFrame::OnEventTcpRoomRead
case MDM_GF_GAME: //游戏命令 200
RoomFrame::OnGameMessage
SceneLogic::onGameMessage
case SUB_S_SEND_RECORD: // 游戏记录 106
账号登陆九亿
包头8个字节,包体200个字节
setUserLogin
send 1_1,send data size = 208
m_pClientLoginSock->sendData(MDM_GP_LOGON,SUB_GP_LOGON_ACCOUNTS,pLogonByAccounts,sizeof(CMD_GP_LogonAccounts));
send 0_2,send data size = 136
包头8个字节,包体128个字节
validate->szValidateKey = 0x00aceb6c L"345E2FFA-891E-4021-A57E-80ECF3466896"
m_pClientGameSock->sendData(MDM_KN_COMMAND, SUB_KN_VALIDATE_SOCKET, (void*)validate, sizeof(TCP_Validate));
登录失败,错误代码lf.lErrorCode=1
RoomFrame::OnSocketSubGRLogonFailure
wMainCmdID = 1,wSubCmdID = 101
m_eDataType = 2
close socket
game server login failed! file(f:\cocos2d-x-2.2.5\projects\9yilottery\classes\entity\roomframe.cpp) line(270)
您的帐号不存在或者密码输入有误,请查证后再次尝试登录!
九亿登录服返回
connectLoginServer
setUserLogin
send 1_1,send data size = 208
wMainCmdID = 1,wSubCmdID = 100
m_eDataType = 1
OnSocketSubLogonSuccess
wFaceID:0
login success2! file(f:\cocos2d-x-2.2.5\projects\9yilottery\classes\msgdispatch\msgdispatch.cpp) line(522)
login success! file(f:\cocos2d-x-2.2.5\projects\9yilottery\classes\msgdispatch\msgdispatch.cpp) line(549)
case MDM_GP_LOGON: //登录消息 1
case SUB_MB_LOGON_SUCCESS: // 登录成功 100
wMainCmdID = 2,wSubCmdID = 100
m_eDataType = 1
case MDM_GP_SERVER_LIST://列表消息 2
case SUB_MB_LIST_KIND: // 种类列表 100
CMD_Logon = 1, // 登录
wMainCmdID = 2,wSubCmdID = 101
m_eDataType = 1
case MDM_GP_SERVER_LIST://列表消息 2
case SUB_MB_LIST_SERVER: // 房间列表 101
wMainCmdID = 2,wSubCmdID = 103
m_eDataType = 1
OnSocketSubListFinish
case MDM_GP_SERVER_LIST://列表消息 2
case SUB_MB_LIST_FINISH: // 列表完成 103
wMainCmdID = 1,wSubCmdID = 102
m_eDataType = 1
wMainCmdID = 1,wSubCmdID = 102 wDataSize=4
OnSocketSubGPLogonFinish
wIntermitTime=0,wOnLineCountTime=600
case MDM_GP_LOGON: //登录消息 1
case SUB_GP_LOGON_FINISH: // 登录完成 102<add by hxh>
不是:
case MDM_GR_LOGON: //登录消息 1
case SUB_GR_LOGON_FINISH: //登陆完成 102
wMainCmdID = 3,wSubCmdID = 503
m_eDataType = 1
case MDM_GP_USER_SERVICE: // 3
case SUB_GP_QUERY_TIME_RET:// 503
九亿房间服登录
ip=120.27.161.76,wServerPort=3000
send 0_2,send data size = 136
hanxiaohua
hxh123
sizeof(CMD_GR_LogonMobile)=146,m_dwUserID=80183
send 1_2,send data size = 154
包头8个字节,包体146个字节
m_pClientGameSock->sendData(MDM_GR_LOGON, SUB_GR_LOGON_MOBILE, (void*)lm, sizeof(CMD_GR_LogonMobile));
#define MDM_GR_LOGON 1 // 登录信息
#define SUB_GR_LOGON_MOBILE 2 // 手机登录
登录房间失败
case MDM_GR_LOGON: //登录消息 1
case SUB_GR_LOGON_FAILURE: //登陆失败 101
错误码为4,包体50个字节
wMainCmdID = 1,wSubCmdID = 101
m_eDataType = 2
close socket
game server login failed! file(f:\cocos2d-x-2.2.5\projects\9yilottery\classes\entity\roomframe.cpp) line(275)
抱歉地通知您,您的帐户没有权限进入此类游戏!
登录完成
RoomFrame::OnSocketSubGRLogonFinish m_bStartType=1,m_cbStatus=0
返回大厅时起立请求
wTableID=0,wChairID=0,cbForceLeave=1
send 3_4,send data size = 13
包头8个字节,包体5个字节
m_pClientGameSock->sendData(MDM_GR_USER, SUB_GR_USER_STANDUP, info, sizeof(CMD_GR_UserStandUp));
在服务器那里,网络通信有两个接口:IClientSocketSink[ZhuQue项目是IClientKernelSink] IAttemperEngineSink
class CAttemperEngineSink : public IAttemperEngineSink, public IGameServiceFrame