connect() timeout after server restarts
connect() timeout after server restarts
- Subject: connect() timeout after server restarts
- From: "Mu Lin" <email@hidden>
- Date: Fri, 14 Oct 2005 18:16:46 -0700
- Importance: normal
- Priority: normal
Hi, All:
I am porting an app from Solaris to Mac OS X.
A target box running vxWorks is connected to a Mac G5 using dedicated
ethernet. The Mac G5 acts as tcp server, while the target box is the
client.
The porting works in general, but I have a pair of annoying problems.
When I kill the tcp server in G5, restart it and restart client in
the remote box, the client takes a timeout of connect() before the
connection to the server is established.
But after a reboot of Mac, eg. the tcp server in Mac G5 has never
been killed, the target connect() rather quickly.
The second problem is if I kill the tcp server in the Mac, on the
client side, I see the tcp connection is in CLOSE_WAIT state but it
never really been closed, and the read() on the client side blocks
forever and never returns 0 or -1.
I don't have both problems when running the tcp server on Solaris.
Nagle algorithm is disabled, NO_DELAY is enabled and SO_REUSEADDR is
enabled for the sockets.
The code is plain C using socket functions.
Any suggestion?
Regards
Mark
This mail server is the property of Spectral Dynamics, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden