示例#1
0
 public void Dispose()
 {
     GC.SuppressFinalize(this);
     if (Pipes != null)
     {
         Pipes.DeletePipes();
     }
     if (WebSocket != null)
     {
         WebSocket.Close();
         WebSocket = null;
     }
 }
示例#2
0
 public void Dispose()
 {
     GC.SuppressFinalize(this);
     if (Pipes != null)
     {
         Pipes.DeletePipes();
     }
     if (WebSockets.Count > 0)
     {
         foreach (var webSocket in WebSockets)
         {
             webSocket.Close();
         }
     }
 }
示例#3
0
        public void Dispose()
        {
            GC.SuppressFinalize(this);

            if (Pipes != null)
            {
                Pipes.DeletePipes();
            }

            foreach (var client in Clients.Values)
            {
                foreach (var webSocket in client.WebSockets)
                {
                    webSocket.Close();
                }

                if (client.AudioWebSocket != null)
                {
                    client.AudioWebSocket.Close();
                }
            }
        }