private void Server_NewSessionConnected(CrmSocketSession session) { if (session.IsUnKnowScoket) { session.Close(CloseReason.SocketError); } CrmSocketConnManager.Connect(session); }
private void Server_NewMessageReceived(CrmSocketSession session, string value) { if (value == CrmSocketServer.HEARTBEAT) { CrmSocketConnManager.HeartBeat(session); session.SendJsonMessage("MSG", "SocketIsConnected"); // 心跳信息不处理 return; } session.SendJsonMessage("MSG", $"ServerRecivedMsg{value}"); }
private void Server_SessionClosed(CrmSocketSession session, CloseReason value) { CrmSocketConnManager.DisConnection(session, value); }