Re: socket_close not working

Frank Rehberger <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
Saurabh Bhatla wrote:

>Hi all,
>  I am trying to make client server application which uses socket. I can
>make a connection and can read and write on sockets. But when i close
>the socket and start the application again i get the exception that the
>port is already in use. It should not say it as i m closing the socket,
>so it should free the port. I m using 
>  socket_close(Socket).
>Is there any other way of releasing the port.
>Any suggestions.
>
It's not a bug, it's a feature ;)
After usage by default TCP-ports are locked by Operating-System for 2 
Minutes (120seconds).
Solution:  gprolog might support REUSE-flag when binding a 
listener-socket to specific port number.

Regards, Frank

---
Frank Rehberger

XTRADYNE Technologies AG
Schoenhauser Allee 6/7
D-10119 Berlin Germany
Phone +49-30-44 03 06-37
Fax   +49-30-44 03 06-78
Email [email protected]
WWW   www.xtradyne.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.