Esempio n. 1
0
 public void SendPacket(string packet)
 {
     if (!IsDisposing)
     {
         _client.SendPacket(packet);
     }
 }
Esempio n. 2
0
 // [Obsolete("Primitive string operations will be removed in future, use PacketDefinition
 // SendPacket instead. SendPacket with string parameter should only be used for debugging.")]
 public void SendPacket(string packet, byte priority = 10)
 {
     if (!IsDisposing)
     {
         _client.SendPacket(packet, priority);
     }
 }
Esempio n. 3
0
        protected override ClientSession IntializeNewSession(INetworkClient client)
        {
            if (!CheckGeneralLog(client))
            {
                Logger.Warn(string.Format(Language.Instance.GetMessageFromKey("FORCED_DISCONNECT"), client.ClientId));
                client.Initialize(_fallbackEncryptor);
                client.SendPacket($"fail {Language.Instance.GetMessageFromKey("CONNECTION_LOST")}");
                client.Disconnect();
                return(null);
            }
            ClientSession session = new ClientSession(client);

            session.Initialize(_encryptor, IsWorldServer);
            return(session);
        }