Exemple #1
0
 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);
     }
 }
Exemple #2
0
        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);
                }
            }
        }
Exemple #3
0
 public void ChannelDisconnect(ServerBase server, ChannelDisposedEventArgs e)
 {
     Log.WarnFormat("{0} disconnected!", e.Channel.EndPoint);
 }
Exemple #4
0
 public void ChannelDisconnect(ServerBase server, ChannelDisposedEventArgs e)
 {
     Utils.GetLog <TrackerServer>().InfoFormat("{0} Discontected TrackerServer", e.Channel.EndPoint);
 }
Exemple #5
0
 protected override void OnDisposed(object sender, ChannelDisposedEventArgs e)
 {
     base.OnDisposed(sender, e);
     System.Console.WriteLine("{0} disposed!", e.Channel.EndPoint);
 }
Exemple #6
0
 public void ChannelDisconnect(ServerBase server, ChannelDisposedEventArgs e)
 {
     Utils.GetLog<TrackerServer>().InfoFormat("{0} Discontected TrackerServer", e.Channel.EndPoint);
 }
Exemple #7
0
 public void ChannelDisconnect(ServerBase server, ChannelDisposedEventArgs e)
 {
     Log.WarnFormat("{0} disconnected!", e.Channel.EndPoint);
 }
Exemple #8
0
 protected override void OnDisposed(object sender, ChannelDisposedEventArgs e)
 {
     base.OnDisposed(sender, e);
     System.Console.WriteLine("{0} disposed!", e.Channel.EndPoint);
 }