• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
connect() timeout after server restarts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: connect() timeout after server restarts
      • From: "Peter Lovell" <email@hidden>
  • Prev by Date: Re: Wake On LAN
  • Next by Date: mount() from Cocoa App
  • Previous by thread: Re: Wake On LAN
  • Next by thread: Re: connect() timeout after server restarts
  • Index(es):
    • Date
    • Thread