Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check a socket state (UNIX)

Status
Not open for further replies.

JimHudd

Programmer
Joined
Apr 26, 2007
Messages
1
Location
US
I'm writing an FTP client (Perl 5.005_03) and I'm having problems with sockets in TIME_WAIT state. In know after closing a socket they have to hang around for a while, but if I run my app again straight after it exits then it hangs as the first socket it tries is still in TIME_WAIT. I'm looking for some way to determine the state of a returned socket before trying to use it.

Any thoughts?

Cheers,
Jimbo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top