Beispiel #1
0
        public static void VerifyFixUsername(Room room, RemoteConnectionInfo info)
        {
            var socketWithName = room.GetUser(info.Name);

            if (socketWithName != null && socketWithName != info.Socket)
            {
                info.SendSetName(GetUserName(info.Name, room), false, false);
            }
        }
 public static void SetInfo(this IWebSocketConnection socket, RemoteConnectionInfo info)
 {
     if (tags.ContainsKey(socket))
     {
         tags[socket] = info;
     }
     else
     {
         tags.Add(socket, info);
     }
 }
Beispiel #3
0
 public abstract void HandlePacket(Dictionary <string, object> data, IWebSocketConnection socket, RemoteConnectionInfo info, Room room, ref List <IWebSocketConnection> allSockets);
Beispiel #4
0
 public abstract void HandleCommand(IWebSocketConnection socket, RemoteConnectionInfo info, Room room);