Re: Does nlHint(NL_REUSE_ADDRESS, NL_TRUE) apply to all sockets, or listen only sockets?


[ Follow Ups ] [ Post Followup ] [ Back To Message Board ]

Posted by Phil Frisbie, Jr. on July 03, 2006 at 20:04:00:

In Reply to: Does nlHint(NL_REUSE_ADDRESS, NL_TRUE) apply to all sockets, or listen only sockets? posted by Timmy on June 28, 2006 at 23:04:17:

: Does nlHint(NL_REUSE_ADDRESS, NL_TRUE) apply to all sockets, or listen only sockets?

Yes, but it only makes sense for TCP listen sockets or UDP sockets. This is a straight wrapper around the low level Berkeley Sockets, so all cavets apply.

: I am using HawkNL 1.68, but I have having problems with "nlHint(NL_REUSE_ADDRESS, NL_TRUE)"
:
: In the following code (http://www.timorg.net/setup.html) the nlHint succeeds, the error isnt printed) I open my socket and connect to my telnet server, it works.
: Then when I close the program, the socket goes into TIME_WAIT, but when I rerun the program, the socket isnt reused, I have to wait the 2 minutes for it to time out, before the program will work again.
(snip)
: Maybe I have misunderstood what the hint actually means, but from reading the docs, it should rebind using the same port, so I dont have to wait, but it doesnt seem to work that way.

OK, but what type of socket, and how are you using it?

Phil



Follow Ups:


Post a Followup

Name:
E-Mail:

Subject:

Comments:



[ Follow Ups ] [ Post Followup ] [ Back To Message Board ]