public void SendPacket(string packet) { if (!IsDisposing) { _client.SendPacket(packet); } }
// [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); } }
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); }