protected override void OnDisposed(object sender, ChannelDisposedEventArgs e) { base.OnDisposed(sender, e); Console.WriteLine("{0} disposed", e.Channel.EndPoint); JsonMessage msg = new JsonMessage(); User user = new User(); user.Name = e.Channel.Name; user.ID = e.Channel.ClientID; user.IP = e.Channel.EndPoint.ToString(); msg.type = "unregister"; msg.data = (User)e.Channel.Tag; foreach (IChannel item in this.Server.GetOnlines()) { if (item != e.Channel) item.Send(msg); } }
protected override void OnDisposed(object sender, ChannelDisposedEventArgs e) { base.OnDisposed(sender, e); Console.WriteLine("{0} disposed", e.Channel.EndPoint); JsonMessage msg = new JsonMessage(); User user = new User(); user.Name = e.Channel.Name; user.ID = e.Channel.ClientID; user.IP = e.Channel.EndPoint.ToString(); msg.type = "unregister"; msg.data = (User)e.Channel.Tag; foreach (IChannel item in this.Server.GetOnlines()) { if (item != e.Channel) { item.Send(msg); } } }
public void ChannelDisconnect(ServerBase server, ChannelDisposedEventArgs e) { Log.WarnFormat("{0} disconnected!", e.Channel.EndPoint); }
public void ChannelDisconnect(ServerBase server, ChannelDisposedEventArgs e) { Utils.GetLog <TrackerServer>().InfoFormat("{0} Discontected TrackerServer", e.Channel.EndPoint); }
protected override void OnDisposed(object sender, ChannelDisposedEventArgs e) { base.OnDisposed(sender, e); System.Console.WriteLine("{0} disposed!", e.Channel.EndPoint); }
public void ChannelDisconnect(ServerBase server, ChannelDisposedEventArgs e) { Utils.GetLog<TrackerServer>().InfoFormat("{0} Discontected TrackerServer", e.Channel.EndPoint); }