private void Events_ServerDisconnected(object sender, DisconnectionEventArgs e) { Dispatcher.Invoke(() => { txtHistoricoMensagens.Text += $"{e.IpPort} disconectou-se.{Environment.NewLine}"; }); }
private static void ClientDisconnected(object sender, DisconnectionEventArgs e) { Debug.Log($"Client from {e.IpPort} disconnected!"); Client client = FindClientByIpPort(e.IpPort); client.Disconnect(); }
private void Events_ClientDisconnected(object sender, DisconnectionEventArgs e) { Dispatcher.Invoke(() => { txtHistoricoMensagens.Text += $"{e.IpPort} disconectou-se.{Environment.NewLine}"; ltbIpsConectados.Items.Remove(e.IpPort); }); }
private void OnDisconnected(object sender, DisconnectionEventArgs e) { this.BeginInvoke((Action) delegate { cbo_client.Items.Remove(e.IpPort); }); ShowLog($"客户端断开连接,原因:{e.Reason}"); }
private void OnClientDisconnected(object sender, DisconnectionEventArgs e) { Logger.Info($"client '{e.IpPort}' disconnected. Reason: {e.Reason.ToString()} "); var removedUser = RemoveClientFromUserList(e.IpPort); InformOtherClients(removedUser, e.Reason.ToString()); }
public void baglantikesildi(object sender, DisconnectionEventArgs args) { logbox.AppendText("Bağlantı Kesildi: " + args.IpPort + "\r\n"); foreach (DataGridViewRow row in clientdatagrid.Rows) { if ((string)row.Cells[0].Value == args.IpPort) { int index = row.Index; clientdatagrid.Rows.RemoveAt(index); } } iplist.Remove(args.IpPort); //ip listesinden çıkardık }
private static void AsyncSocket_OnSinalizaDesconexao(object sender, DisconnectionEventArgs e) { Console.WriteLine($"Client {e.SessionID} has disconnected"); if (e.Exception != null) { Console.WriteLine($"Reason: {e.Exception.Message}"); } var session = sessions.FirstOrDefault(x => x.SessionID == e.SessionID); if (session != null) { sessions.Remove(session); } }
public static void disconnectedFromServer(object sender, DisconnectionEventArgs args) { Tools.writeLog($"Disconnected from server: {args.IpPort}", LogType.Error); trytoconnect: try { Tools.writeLog("Connecting...", LogType.Info); Network.client.Connect(); } catch { Tools.writeLog($"Server did not respond. Trying to re-connect in {Network.ReconnectSecond} seconds...", LogType.Error); Thread.Sleep(Network.ReconnectSecond * 1000); //sleep Network.ReconnectSecond seconds goto trytoconnect; } }
public static void servergitti(object sender, DisconnectionEventArgs args) { Console.WriteLine("Server Bağlantısı Koptu! Bağlanılmaya Çalışılıyor. Kopma Nedeni: " + args.Reason); //bağlantı kesildi eventi baglanmayacalis: try { Console.WriteLine("Bağlanılıyor..."); client.Connect(); //bağlanmaya çalışıyoruz Thread.Sleep(10000); //10 sn de bir bağlanmaya çalışıyor } catch { Console.WriteLine("Bağlanılamadı."); goto baglanmayacalis; //bağlanamayınca geri dönüyoruz } }
public void CloseSession() { lock (thisLock) { ConnectionEvent -= ConnectionHandler; DisconnectionEvent -= DisconnectionHandler; MessageEvent -= MessageHandler; this._clients.Remove(this._client); } // All Clients are informed of the disconnection of this client var args = new DisconnectionEventArgs() { Client = this._client }; DisconnectionEvent?.Invoke(this, args); Console.WriteLine("{0} has closed his session", this._client.Name); }
private void OnDisconnected(object sender, DisconnectionEventArgs e) { ShowLog($"断开连接,原因:{e.Reason}"); }
public static void ClientBaglantisiKesildi(object sender, DisconnectionEventArgs e) { Log.Debug("Bağlantı Kesildi: {ip}", e.IpPort); }
private void ServerDisconnected(object sender, DisconnectionEventArgs args) { Logger(Severity.Debug, args.IpPort + " disconnected: " + args.Reason.ToString()); }
static void ServerClientDisconnected(object sender, DisconnectionEventArgs args) { Console.WriteLine("Server detected disconnection from client: " + args.IpPort + " [" + args.Reason.ToString() + "]"); }
private void ServerDisconnected(object sender, DisconnectionEventArgs e) { Logger.Info($"Client disconnected from server '{Ip}:{Port}'. Reason: '{e.Reason.ToString()}'"); InvokeServerDisconnectEvent(); }
private static void ClientServerDisconnected(object sender, DisconnectionEventArgs args) { }
private void ClientConnectionContainer_ConnectionLost(object sender, DisconnectionEventArgs eventArgs) { }
private void DisconnectionHandler(object sender, DisconnectionEventArgs e) { this._callback.DisconnectionClient(e.Client); }
private void Events_ClientDisconnected(object sender, DisconnectionEventArgs e) { }
private static void ServerClientDisconnected(object sender, DisconnectionEventArgs args) { connectionCount--; Console.WriteLine("[server] disconnection from " + args.IpPort + " [now " + connectionCount + "]: " + args.Reason.ToString()); }
private void OnClientDisconnected(object sender, DisconnectionEventArgs e) { Logger("Client " + e.IpPort + " disconnected: " + e.Reason.ToString()); _ClientIpPort = string.Empty; }
private static void ServerDisconnected(object sender, DisconnectionEventArgs args) { Console.WriteLine(args.IpPort + " disconnected: " + args.Reason.ToString()); }
public static void clientDisconnected(object sender, DisconnectionEventArgs args) { }