Example #1
0
        private SocketIO CreateSocketIO(UsefulUser user)
        {
            SocketIO socket = new SocketIO(user.AuthKey, user.AuthToken, user.PhpSessId, guiData.CanvasId);

            //SocketIO socket = new SocketIO(guiData.CanvasId);
            socket.OnEvent += (a, b) => { OnSocketEvent(a, b, user.Id); };
            return(socket);
        }
 public void UpdateUsers()
 {
     lock (users)
     {
         users.Clear();
         foreach (GUIUser user in dataExchange.GUIUsers)
         {
             if (!user.Enabled || string.IsNullOrEmpty(user.PhpSessId) || string.IsNullOrEmpty(user.AuthKey) || string.IsNullOrEmpty(user.AuthToken))
             {
                 continue;
             }
             UsefulUser newUser = new UsefulUser(user.InternalId, user.AuthKey, user.AuthToken, user.PhpSessId);
             users.Add(newUser);
         }
     }
 }