CSharpRTMP.Core.NetIO.UDPCarrier.SetReceiveBuffer C# (CSharp) Method

SetReceiveBuffer() public method

public SetReceiveBuffer ( InputStream ms, SocketAsyncEventArgs socketAsyncEventArgs, int size ) : bool
ms CSharpRTMP.Common.InputStream
socketAsyncEventArgs System.Net.Sockets.SocketAsyncEventArgs
size int
return bool
        public bool SetReceiveBuffer(InputStream ms, SocketAsyncEventArgs socketAsyncEventArgs, int size)
        {
            lock (ms)
            {
                ms.SetLength(ms.Published + size);
                socketAsyncEventArgs.SetBuffer(ms.GetBuffer(), (int)ms.Published, size);
            }
            return true;
        }