Re: TCP connect in Non Blocking Mode
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Thu, 24 Apr 2008 13:50:43 -0700 (PDT)
On Apr 23, 9:44 am, Rainer Temme <Rainer_Te...@xxxxxxxxxxxxxxxxxxxxxx>
wrote:
Prabhu wrote:
err = connect(sd, (struct sockaddr*) &sa, sizeof(sa));....
l_fds=select(sd+1, NULL,&filedes_set,NULL,&l_connect_timeout);
This works fine. The issue that I face is when the server refuses
connection by sending RST for the SYN from client. The select waits
for 30 seconds and later returns timing out. RST though is sent
immediately by the server. The client application need to capture the
RST as soon as it arrives. How do we achieve that. Why does not the
select return immediately when the RST arrives at client?
Have you tried to select() the filedescriptor for read (in the
read-fd-set) as well?
He's trying to connect. Checking for readability doesn't make sense
unless he has nothing else to do until the other side sends him any
data.
DS
.
- Follow-Ups:
- Re: TCP connect in Non Blocking Mode
- From: Rainer Temme
- Re: TCP connect in Non Blocking Mode
- References:
- TCP connect in Non Blocking Mode
- From: Prabhu
- Re: TCP connect in Non Blocking Mode
- From: Rainer Temme
- TCP connect in Non Blocking Mode
- Prev by Date: example of .journal file
- Next by Date: Re: Bit bucket directory
- Previous by thread: Re: TCP connect in Non Blocking Mode
- Next by thread: Re: TCP connect in Non Blocking Mode
- Index(es):
Relevant Pages
|