Exemplo n.º 1
0
 public void SendPacket(DevServerPackets type)
 {
     if (type == DevServerPackets.Ping)
     {
         m_pingRequest = DateTime.Now;
     }
     SendPacket(new[] { (byte)type });
 }
Exemplo n.º 2
0
 public void SendPacket(DevServerPackets type)
 {
     if (type == DevServerPackets.Ping)
     {
         m_pingRequest = DateTime.Now;
     }
     lock (m_sendQueue)
         m_sendQueue.Enqueue(new[] { (byte)type });
 }
Exemplo n.º 3
0
        private void SendPacket(DevServerPackets type, byte[] data)
        {
            var stream = new MemoryStream();
            var writer = new BinaryWriter(stream);

            writer.Write((byte)type);
            writer.Write((short)(data.Length));
            writer.Write(data);
            SendPacket(stream.ToArray());
        }
Exemplo n.º 4
0
 private void SendPacket(DevServerPackets type, byte[] data)
 {
     var stream = new MemoryStream();
     var writer = new BinaryWriter(stream);
     writer.Write((byte)type);
     writer.Write((short)(data.Length));
     writer.Write(data);
     lock(m_sendQueue)
         m_sendQueue.Enqueue(stream.ToArray());
 }
Exemplo n.º 5
0
 public void SendPacket(DevServerPackets type)
 {
     if (type == DevServerPackets.Ping) m_pingRequest = DateTime.Now;
     lock (m_sendQueue)
         m_sendQueue.Enqueue(new[] { (byte)type });
 }
Exemplo n.º 6
0
 public void SendPacket(DevServerPackets type, string data)
 {
     SendPacket(type, Encoding.UTF8.GetBytes(data));
 }
Exemplo n.º 7
0
 public void SendPacket(DevServerPackets type)
 {
     if (type == DevServerPackets.Ping) m_pingRequest = DateTime.Now;
     SendPacket(new[] { (byte)type });
 }
Exemplo n.º 8
0
 public void SendPacket(DevServerPackets type, string data)
 {
     SendPacket(type, Encoding.UTF8.GetBytes(data));
 }