Esempio n. 1
0
 public void SendPacket(IServerPacket Message)
 {
     if (Message == null || this.GetConnection() == null)
     {
         return;
     }
     this.GetConnection().SendData(EncodeDecode.EncodeMessage(Message.GetBytes()));
 }
Esempio n. 2
0
        public void SendPacket(IServerPacket message)
        {
            if (GetConnection() == null)
            {
                return;
            }

            GetConnection().SendData(message.GetBytes());
        }
Esempio n. 3
0
        public void SendPacket(IServerPacket message)
        {
            var bytes = message.GetBytes();

            if (message == null)
            {
                return;
            }
            if (GetConnection() == null)
            {
                return;
            }

            GetConnection().SendData(bytes);
        }
Esempio n. 4
0
        public void SendMessage(IServerPacket Message)
        {
            byte[] bytes = Message.GetBytes();

            if (Message == null)
            {
                return;
            }

            if (GetConnection() == null)
            {
                return;
            }

            GetConnection().SendData(bytes);
        }
Esempio n. 5
0
        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"); }
        }
Esempio n. 6
0
        internal void SendMessage(IServerPacket Message)
        {
            byte[] bytes = Message.GetBytes();

            if (Message == null)
                return;
            if (GetConnection() == null)
                return;

            GetConnection().SendData(bytes);
        }