コード例 #1
0
        private void HandleDisconnect()
        {
            Status      = ConnectionStatus.Disconnected;
            IsConnected = false;
            UDPTransport.Disconnect();
            connectionID = -1;

            if (ServerPeer != null)
            {
                ServerPeer.Dispose();
                ServerPeer.IsConnected = false;
            }
            Disconnected?.Invoke();
        }
コード例 #2
0
        /// <summary>
        ///     Disconnect the <see cref="ClientSocket"/> from the <see cref="ServerSocket"/>.
        /// </summary>
        public void Disconnect()
        {
            UDPTransport.Disconnect();

            HandleDisconnect();
        }
コード例 #3
0
 private void OnApplicationQuit()
 {
     UDPTransport.Disconnect();
 }