[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Couldn't bind socket at the port above 60000



On Sun, Jan 16, 2000 at 05:32:37PM +0200, Jonathan Ben-Avraham wrote:

> > We've got "address is already in use" when trying to bind at port 61xxx.
>
> Yes, there is someone listening already on that port. It is most likely
> you! That is, when you exit your program the socket stays open for a
> while. Check it by waiting for about five minutes and trying to run your
> program again. You need to use setsockopt so the socket is cleared as soon
> as the program exit. See Stevens.

You may want to set the SO_REUSEADDR option with setsockopt().

-- 
believing is seeing
gaal@forum2.org
http://www.forum2.org/gaal/

=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il