diff --git a/server/tools/protobuild/ss_msgid.proto b/server/tools/protobuild/ss_msgid.proto index 3d664af..c6868a6 100644 --- a/server/tools/protobuild/ss_msgid.proto +++ b/server/tools/protobuild/ss_msgid.proto @@ -10,8 +10,7 @@ enum SSMessageId_e _SS_MS_ResponseTargetServer = 12; _SS_ForceCloseSocket = 13; - _SS_CMKcpHandshake = 98; - _SS_SMKcpHandshake = 99; + _SS_CMKcpHandshake = 99; _SS_CMPing = 101; _SS_SMRpcError = 102; _SS_CMLogin = 103; diff --git a/server/wsproxy/GCListener.h b/server/wsproxy/GCListener.h index c045f27..4aa30d5 100644 --- a/server/wsproxy/GCListener.h +++ b/server/wsproxy/GCListener.h @@ -23,6 +23,12 @@ class GCListener : public a8::Singleton void SendMsg(unsigned short socket_handle, T& msg) { static int msgid = f8::Net_GetMessageId(msg); + SendMsgEx(socket_handle, msgid, msg); + } + + template + void SendMsgEx(unsigned short socket_handle, int msgid, T& msg) + { f8::Net_SendMsg(tcp_listener_, socket_handle, 0, msgid, msg); } diff --git a/server/wsproxy/longsessionmgr.cc b/server/wsproxy/longsessionmgr.cc index f7b9b55..d0779a5 100644 --- a/server/wsproxy/longsessionmgr.cc +++ b/server/wsproxy/longsessionmgr.cc @@ -70,7 +70,7 @@ void LongSessionMgr::_SS_CMKcpHandshake(f8::MsgHdr& hdr, const ss::SS_CMKcpHands } respmsg.set_remote_host(JsonDataMgr::Instance()->GetUdpHost()); respmsg.set_remote_port(JsonDataMgr::Instance()->GetUdpPort()); - GCListener::Instance()->SendMsg(hdr.socket_handle, respmsg); + GCListener::Instance()->SendMsgEx(hdr.socket_handle, ss::_SS_CMKcpHandshake, respmsg); } std::shared_ptr LongSessionMgr::GetSession(int socket_handle) diff --git a/server/wsproxy/mastermgr.cc b/server/wsproxy/mastermgr.cc index c591a05..448c6c5 100644 --- a/server/wsproxy/mastermgr.cc +++ b/server/wsproxy/mastermgr.cc @@ -136,7 +136,6 @@ void MasterMgr::RequestTargetServer(f8::MsgHdr& hdr, msg.set_is_reconnect(is_reconnect); msg.set_proto_version(proto_version); #ifdef DEBUG -#else std::string url; std::string query_str; {