ScutGame / Scut

Scut is a free, open source, stable game server framework, which support C#/Python/Lua script, and support Unity3d, Cocos2dx, FlashAir client access.
1.33k stars 577 forks source link

Server to Server RemoteService send heart package which can not refresh the session #17

Open Jesse1205 opened 8 years ago

Jesse1205 commented 8 years ago

private void InitClient() { try { if (_client is SocketRemoteClient) { var client = _client as SocketRemoteClient; RequestParam heartParam = new RequestParam(); heartParam["ActionId"] = (int)ActionEnum.Heartbeat; heartParam["MsgId"] = 0; string post = string.Format("?d={0}", HttpUtility.UrlEncode(heartParam.ToPostString())); client.HeartPacket = Encoding.ASCII.GetBytes(post); } } catch { } }