Ejemplo n.º 1
0
 public void Dispose()
 {
     if (NetworkSocket != null && NetworkSocket.Connected)
     {
         NetworkSocket.Shutdown(SocketShutdown.Both);
     }
 }
Ejemplo n.º 2
0
        public void Shutdown()
        {
            Log.Information("Server socket closing...");
            NetworkSocket?.Shutdown("Server going down for quit");

            NetworkSocket    = null;
            NetworkPipe      = null;
            NetConfiguration = null;
        }
Ejemplo n.º 3
0
 public void Dispose()
 {
     if (NetworkSocket.Connected)
     {
         NetworkSocket.Shutdown(SocketShutdown.Both);
         NetworkSocket.Disconnect(true);
     }
     NetworkSocket.Close(1000);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Shutdown the network client
        /// </summary>
        public void Shutdown()
        {
            Log.Information("stopping Client NetworkSocket...");
            NetworkSocket?.Shutdown("Client application exited");

            NetworkSocket    = null;
            NetConfiguration = null;
            MessagePipe      = null;
        }
Ejemplo n.º 5
0
 public void Disconnect(Exception ex)
 {
     if (NetworkSocket != null)
     {
         NetworkSocket.Shutdown(SocketShutdown.Both);
         NetworkSocket.Dispose();
         NetworkSocket = null;
         OnDisconnect?.Invoke(this, ex);
     }
 }