コード例 #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 TcpSocket_SocketError(object sender, InSimErrorEventArgs e)
 {
     UdpSocket.Disconnect();
     OnInSimError(e);
 }
コード例 #3
0
 private void TcpSocket_ConnectionLost(object sender, EventArgs e)
 {
     UdpSocket.Disconnect();
     OnDisconnected(new DisconnectedEventArgs(DisconnectReason.Lost));
 }