private void OnClientDisconnected(ClientDisconnectedEventArgs e)
        {
            ClientDisconnectedEventHandler handler = ClientDisconnected;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 2
0
        void ClientDisconnected(object sender, ClientDisconnectedEventArgs e)
        {
            players.Remove(e.Client);

            using (DarkRiftWriter writer = DarkRiftWriter.Create()) {
                writer.Write(e.Client.ID);
                using (Message message = Message.Create(Tags.DisconnectedPlayer, writer)) {
                    foreach (IClient client in ClientManager.GetAllClients())
                    {
                        client.SendMessage(message, SendMode.Reliable);
                    }
                }
            }
        }
Esempio n. 3
0
 private void Server_ClientDisconnected(object sender, ClientDisconnectedEventArgs e)
 {
     Log("Client " + e.ClientId.ToString() + " Disconnected");
 }
Esempio n. 4
0
 private void Server_ClientDisconnected(object sender, ClientDisconnectedEventArgs e)
 {
     lbEintrag(e.Client, "Client " + e.Client.Client.RemoteEndPoint + " getrennt");
 }
Esempio n. 5
0
 private static void Server_ClientDisconnected(object sender, ClientDisconnectedEventArgs e)
 {
     lblClients.Invoke((MethodInvoker)(() => lblClients.Text = $"{server.NumberOfConnectedClients}"));
 }
Esempio n. 6
0
 private static void Listener_ClientDisconnected(object sender, ClientDisconnectedEventArgs e)
 {
     Interlocked.Decrement(ref _connections);
 }
 private void Server_ClientDisconnected(object sender, ClientDisconnectedEventArgs e)
 {
     lblClients.Invoke((MethodInvoker)(() => lblClients.Text = $"Clients connected: {server.NumberOfConnectedClients}"));
     this.Invoke((MethodInvoker)(() => clientlog.TxtClients($"Disconnected: {e.Client.ToString()}")));
 }
Esempio n. 8
0
 private static void Server_ClientDisconnectedEvent(object sender, ClientDisconnectedEventArgs e)
 {
     Console.WriteLine(e.ClientId + " Disconnected.");
 }