Exemplo n.º 1
0
 public static void SendAll(ChatSession session, MsgInfo msg)
 {
     foreach (var chatSession in session.AppServer.GetSessions(sess => sess.SessionID != session.SessionID))
     {
         Send(chatSession, msg);
     }
 }
Exemplo n.º 2
0
 public static void SendAll(ChatSession session, MsgFrame frame)
 {
     foreach (var chatSession in session.AppServer.GetSessions(sess => sess.SessionID != session.SessionID))
     {
         Send(chatSession, frame);
     }
 }
Exemplo n.º 3
0
        public static void SendResoveFailed(ChatSession session, MsgInfo msg, StringRequestInfo requestInfo)
        {
            session.Logger.DebugFormat("Got command: {0}=>{1}", requestInfo.Key, requestInfo.Body);

            msg.Success = false;
            msg.Message = string.Format("Invalid request({0}): cannot parse data", requestInfo.Key);
            Send(session, msg);
        }
Exemplo n.º 4
0
        public static void Send(ChatSession session, MsgInfo msg)
        {
            var frames = msg.ToFrame();

            foreach (var frame in frames)
            {
                Send(session, frame);
            }
        }
Exemplo n.º 5
0
        public static void Send(ChatSession session, MsgFrame frame)
        {
            var temp = frame.ToString();

            session.Send(temp);
        }