Pchp.Library.Streams.SocketStream.RawRead C# (CSharp) Method

RawRead() protected method

protected RawRead ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int
        protected override int RawRead(byte[] buffer, int offset, int count)
        {
            if (currentTask != null)
                currentTask.Wait();
            try
            {
                int rv = socket.Receive(buffer, offset, count, SocketFlags.None);
                eof = rv == 0;
                return rv;
            }
            catch (System.Exception e)
            {
                PhpException.Throw(PhpError.Warning, ErrResources.stream_socket_error, e.Message);
                return 0;
            }
        }