Beispiel #1
0
    /// <summary>
    /// Posts the packet.
    /// </summary>
    /// <param name="IPacket">I packet.</param>
    public override void    PostPacket(INetPacket packet)
    {
        packet.Finish();

        lock (recvQueue) {
            recvQueue.Enqueue(packet);

                        #if UNITY_EDITOR
            UnityEngine.Debug.Log(string.Format("Packet type({0}) size({1}) Enqueue queue({2})",
                                                packet.Type, packet.Size, recvQueue.Count));
                        #endif
        }
    }
Beispiel #2
0
    /// <summary>
    /// Sends the packet.
    /// </summary>
    /// <param name="packet">Packet.</param>
    public override void    SendPacket(INetPacket packet)
    {
        packet.Finish();

        lock (sendQueue) {
            sendQueue.Enqueue(packet);

                        #if UNITY_EDITOR
            UnityEngine.Debug.Log(string.Format("Send queue count ({0}))",
                                                sendQueue.Count));
                        #endif
        }
    }
Beispiel #3
0
 public void Finish()
 {
     data.Finish();
 }