Re: TCP connect in Non Blocking Mode
- From: Rainer Temme <Rainer_Temme@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 23 Apr 2008 18:44:52 +0200
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?
.
- Follow-Ups:
- Re: TCP connect in Non Blocking Mode
- From: David Schwartz
- Re: TCP connect in Non Blocking Mode
- References:
- TCP connect in Non Blocking Mode
- From: Prabhu
- TCP connect in Non Blocking Mode
- Prev by Date: Re: Get variables from forked child
- Next by Date: Re: Compile differences between Linux and FreeBSD
- Previous by thread: TCP connect in Non Blocking Mode
- Next by thread: Re: TCP connect in Non Blocking Mode
- Index(es):
Relevant Pages
|