示例#1
0
        private void Server_NewSessionConnected(CrmSocketSession session)
        {
            if (session.IsUnKnowScoket)
            {
                session.Close(CloseReason.SocketError);
            }

            CrmSocketConnManager.Connect(session);
        }
示例#2
0
 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}");
 }
示例#3
0
 private void Server_SessionClosed(CrmSocketSession session, CloseReason value)
 {
     CrmSocketConnManager.DisConnection(session, value);
 }