Beispiel #1
0
        private void Manager_ConnectionAdded(object sender, ProxyConnectionEventArgs e)
        {
            e.Proxy.ClientConnection.PacketReceived += PacketReceived;
            e.Proxy.ServerConnection.PacketReceived += PacketReceived;

            e.Proxy.ClientConnection.AfterPacketReceived += AfterPacketReceived;
            e.Proxy.ServerConnection.AfterPacketReceived += AfterPacketReceived;
        }
Beispiel #2
0
 private void Proxy_ConnectionClosed(object sender, ProxyConnectionEventArgs e)
 {
     if (!string.IsNullOrEmpty(e.Proxy.Player.Name))
     {
         StarLog.DefaultLogger.Info("Player {0} disconnected! ({1})", e.Proxy.Player.Name, e.Proxy.ConnectionId);
     }
     else
     {
         StarLog.DefaultLogger.Info("Connection {0} disconnected", e.Proxy.ConnectionId);
     }
 }