• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to reset socket???  RSS feed

 
Yaroslav Chinskiy
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I am working on remote logger.
I have a log server that listens to some port. The client connects to the port and writes a message. If server is down, client would cache messages and try to reconnect every sec.
Ihad to make it work through firewall. So, I started fixed local and remote ports. This is where prob occured. Once client tries to reconnect to thye server, it throws port in use exception. It does not release local port...
How can I force socket to release all used ports???
Thanks, yarik
 
aditya mahajan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I think that if the server is not releasing the socket you can set the TIMEOUT as 1 sec so that the socket will automatically get released after 1 sec
Hope that help
Aditya
Originally posted by Yaroslav Chinskiy:
HI,
I am working on remote logger.
I have a log server that listens to some port. The client connects to the port and writes a message. If server is down, client would cache messages and try to reconnect every sec.
Ihad to make it work through firewall. So, I started fixed local and remote ports. This is where prob occured. Once client tries to reconnect to thye server, it throws port in use exception. It does not release local port...
How can I force socket to release all used ports???
Thanks, yarik

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!