コード例 #1
0
ファイル: TCPData.cs プロジェクト: Cattael/ExplorerOpenGL
 public void DisconnectClient()
 {
     socket.Close();
     stream.Dispose();
     socket.Dispose();
     Disconnection?.Invoke();
 }
コード例 #2
0
ファイル: RakNetServer.cs プロジェクト: Wincent01/Nova
        private void _handleDisconnection(IPEndPoint endpoint)
        {
            _connections[endpoint].StopSendLoop();
            _connections.Remove(endpoint);

            Disconnection?.Invoke(endpoint);
        }
コード例 #3
0
        private void CloseClientSocket(NetConnection connection)
        {
            try
            {
                connection.Socket.Close(CloseTimeout);
            }
            catch (Exception) // throws if client process has already closed
            {
            }

            Disconnection?.Invoke(this, connection);
        }
コード例 #4
0
ファイル: RakNetServer.cs プロジェクト: Wincent01/Nova
        public void CloseConnection(IPEndPoint endpoint)
        {
            if (!_connections.ContainsKey(endpoint))
            {
                throw new InvalidOperationException("Client is not connected");
            }

            Send(new[] { (byte)MessageIdentifiers.DisconnectionNotification }, endpoint);

            _connections[endpoint].StopSendLoop();
            _connections.Remove(endpoint);

            Disconnection?.Invoke(endpoint);
        }
コード例 #5
0
 internal void RaiseDisconnection(string reason)
 {
     Disconnection?.Invoke(this, reason);
 }
コード例 #6
0
ファイル: Server.cs プロジェクト: emipa606/PhiClient
 // Token: 0x0600001B RID: 27 RVA: 0x000024CE File Offset: 0x000006CE
 internal void CloseCallback(ServerClient client)
 {
     clients.Remove(client);
     Disconnection?.Invoke(client);
 }
コード例 #7
0
ファイル: Client.cs プロジェクト: emipa606/PhiClient
 // Token: 0x0600000E RID: 14 RVA: 0x0000228E File Offset: 0x0000048E
 private void CloseCallback(object sender, CloseEventArgs e)
 {
     Disconnection?.Invoke();
 }