예제 #1
0
    /// <summary>
    /// 客户端调用发送(加入到发送队列)
    /// </summary>
    /// <param name="data"></param>
    public void Send(byte[] data, int protoCode)
    {
        if (this.Socket == null || !this.Socket.Connected)
        {
            return;
        }

        LogSystem.LogCore("============================================客户端发送" + protoCode.ToString());

        byte[] pSendMassage = MakeDatas(data, protoCode);
        lock (m_QueueSendData)
        {
            m_QueueSendData.Enqueue(pSendMassage);
        }
        OnCheckSendMassageQueueCallBack();
    }