I would just use the NetworkStream stream or the socket directly and read
until bytesToRead is read or 0 is returned from read(). You should send the
len first or in some fixed len header so you know how many bytes are coming.
Another good reason for this information upfront is you may want to reject
the request for a 3+GB upload or for some other reasons (i.e. no space,
wrong name, wrong secret, etc).
--
William Stacey, MVP
http://mvp.support.microsoft.com
"Michael" <Mi*****@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.com...
I want to read bytes from a file to send them over the internet to another
computer.