Re: C# Async Socket timeouts



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
.



Relevant Pages

  • Re: Who is to Blame for the Katrina SNAFU?
    ... >> Mayor Nagin was in charge of the first response, ... >> and it does not seem unreasonable to say that the first response is the ... Our federal response might be slow, ... >> incompetent, corrupt, and Democrats. ...
    (alt.politics)
  • Re: Who is to Blame for the Katrina SNAFU?
    ... >>Mayor Nagin was in charge of the first response, ... and President ... >>and it does not seem unreasonable to say that the first response is the ... Our federal response might be slow, ...
    (alt.politics)
  • Re: Who is to Blame for the Katrina SNAFU?
    ... >> Mayor Nagin was in charge of the first response, ... >> Bush is in charge of them. ... >> and it does not seem unreasonable to say that the first response is the ... >If it makes you feel better to blame the local governments to make Bush ...
    (alt.politics.bush)
  • ICMP TYPE 3
    ... FIRST RESPONSE: ... Dst Addr: 200-70-xxx-121.rse.com.ar ... Internet Protocol, Src Addr: 172.xxx.230.242, Dst ...
    (Pen-Test)
  • Re: Who is to Blame for the Katrina SNAFU?
    ... >> Mayor Nagin was in charge of the first response, ... Second responders are state-based, and Democrat ... >> and it does not seem unreasonable to say that the first response is the ... Our federal response might be slow, ...
    (alt.politics.bush)