Re: NetworkStream Read/Write operations - # bytes read/written.
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Wed, 22 Nov 2006 18:44:42 -0800
"Charles" <Charles@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9CB95749-FAC0-4796-A2FC-2A6EA6C880FB@xxxxxxxxxxxxxxxx
Is there a way to find out how many bytes NetworkStream Read/Write
actually
read/wrote when there is an exception (i.e. socket read/write timeout).
For reading, if you don't have a successful call to a receiving function,
you cannot safely expect there to be any data at all.
For writing, the best you can do is have something in your application
protocol in which the recipient can tell you how many bytes it received.
That's not exactly the same as how many bytes are written, but it's the best
you can do. If your application protocol has no way to report the bytes
received at the other end, then you have to assume that the entire write
failed.
Pete
.
- Prev by Date: Re: A threading problem
- Next by Date: Cross-thread operation not valid ???
- Previous by thread: How do I use HTML textbox in C#?
- Next by thread: Cross-thread operation not valid ???
- Index(es):
Relevant Pages
|