how to close open socket

  • Thread starter Thread starter rooster575
  • Start date Start date
R

rooster575

I would like to force a socket closed if it is currently open.

For arguments sake, say a function failed to close a socket and another
function would like to use this same socket.
I get the following error:
Only one usage of each socket address (protocol/network address/port) is
normally permitted

Obvously it would be better if the socket was closed correctly the 1st time,
but again, for arguments sake, please assume that it is left open and must
be forced closed by another function.

Thanks in advance.
 
Hello,

rooster575 said:
I would like to force a socket closed if it is currently open.

For arguments sake, say a function failed to close a socket and another
function would like to use this same socket.
I get the following error:
Only one usage of each socket address (protocol/network address/port) is
normally permitted

Obvously it would be better if the socket was closed correctly the 1st time,
but again, for arguments sake, please assume that it is left open and must
be forced closed by another function.

How do you close the socket? By calling its Close method? Post your code.

Regards,
Herfried K. Wagner
 
Back
Top