public void SendPacket(IServerPacket Message) { if (Message == null || this.GetConnection() == null) { return; } this.GetConnection().SendData(EncodeDecode.EncodeMessage(Message.GetBytes())); }
public void SendPacket(IServerPacket message) { if (GetConnection() == null) { return; } GetConnection().SendData(message.GetBytes()); }
public void SendPacket(IServerPacket message) { var bytes = message.GetBytes(); if (message == null) { return; } if (GetConnection() == null) { return; } GetConnection().SendData(bytes); }
public void SendMessage(IServerPacket Message) { byte[] bytes = Message.GetBytes(); if (Message == null) { return; } if (GetConnection() == null) { return; } GetConnection().SendData(bytes); }
internal void SendMessage(IServerPacket Message) { try { if (Message == null) return; //Console.WriteLine("ROOM SENT: [" + Message.Id + "] " + SilverwaveEnvironment.GetDefaultEncoding().GetString(Message.GetBytes()).Replace(Convert.ToChar(0).ToString(), "{char0}")); byte[] PacketData = Message.GetBytes(); lock (roomServerMessages.SyncRoot) { roomServerMessages.Enqueue(PacketData); } } catch (InvalidOperationException e) { Logging.HandleException(e, "Room.SendMessage"); } }
internal void SendMessage(IServerPacket Message) { byte[] bytes = Message.GetBytes(); if (Message == null) return; if (GetConnection() == null) return; GetConnection().SendData(bytes); }