Re: C# Async Socket timeouts
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Wed, 28 May 2008 12:45:10 -0700
On Wed, 28 May 2008 12:37:38 -0700, <ColoradoGeiger@xxxxxxxxx> wrote:
Jeroen,
I think I know what you mean. Since that BeginRead is already
floating out there when I detect a timeout with my own timer, I should
be able to just send data again, and if the client does respond this
time then it will still jump into that original delegate that the
first .BeginRead() attempt.
That makes sense to me. Is that right?
Well, sort of.
The fact is, if you have already sent data, and you expect a response to that data, and you have not received the response yet, you are not going to get a response to any subsequent data you send until you get the first response, assuming you get any response at all.
You can try sending data again, but the likelihood of doing so causing the communications to be "kicked" back into action or something like that is fairly low, and even if it works, you will still wind up with the reply from the previous data you sent, arriving before the reply to the subsequent data you sent.
This all assumes TCP, of course. With UDP, there's no connection and no strict ordering of data transmission, and so it behaves differently.
Pete
.
- Follow-Ups:
- Re: C# Async Socket timeouts
- From: ColoradoGeiger
- Re: C# Async Socket timeouts
- References:
- C# Async Socket timeouts
- From: ColoradoGeiger
- Re: C# Async Socket timeouts
- From: Jeroen Mostert
- Re: C# Async Socket timeouts
- From: ColoradoGeiger
- C# Async Socket timeouts
- Prev by Date: Csharp .NET - VS2003 - console application - Webservice request and sending SOAP body - Mr. Arnold
- Next by Date: Re: Question about return style
- Previous by thread: Re: C# Async Socket timeouts
- Next by thread: Re: C# Async Socket timeouts
- Index(es):
Relevant Pages
|