Ejemplo n.º 1
0
    public void SendPayload()
    {
        if (sendBuffer.Empty) // 보낼것 없으면...
        {
            return;
        }

        //Social,

        if (true == socket.Poll(0, SelectMode.SelectWrite)) // 데이터를 읽을 수 있다면 ...
        {
            int sentBytes = socket.Send(sendBuffer.GetBuffer(), sendBuffer.ReadHead, sendBuffer.Size, SocketFlags.None);
            sendBuffer.MoveReadHead(sentBytes);
            sendBuffer.Rewind();

            Debug.Log($" send : { sentBytes}");
        }
    }