예제 #1
0
        /// <summary>
        /// Disconnects from LFS and releases all resources associated with the connection.
        /// </summary>
        public void Disconnect()
        {
            ThrowIfDisposed();
            ThrowIfNotConnected();

            TcpSocket.Disconnect();
            UdpSocket.Disconnect();

            OnDisconnected(new DisconnectedEventArgs(DisconnectReason.Request));
        }
예제 #2
0
 private void UdpSocket_SocketError(object sender, InSimErrorEventArgs e)
 {
     TcpSocket.Disconnect();
     OnInSimError(e);
 }