예제 #1
0
        public void Connect(string server)
        {
            Server s = JsonConvert.DeserializeObject <Server>(server);

            Groups.AddToGroupAsync(Context.ConnectionId, s.Name);
            HubEventEmitter.ClientConnect(Context.ConnectionId, s.Name);
        }
예제 #2
0
        public void Disconnect()
        {
            Server s = HubEventEmitter.GetServer(Context.ConnectionId);

            Groups.RemoveFromGroupAsync(Context.ConnectionId, s.Name);
            HubEventEmitter.ClientDisconnect(Context.ConnectionId);
        }
예제 #3
0
 public void DisconnectAggregate()
 {
     Groups.RemoveFromGroupAsync(Context.ConnectionId, GROUP_MAIN);
     HubEventEmitter.ClientDisconnectAggregate(Context.ConnectionId);
 }
예제 #4
0
 public void ConnectAggregate()
 {
     Groups.AddToGroupAsync(Context.ConnectionId, GROUP_MAIN);
     HubEventEmitter.ClientConnectAggregate(Context.ConnectionId);
 }