Port still open after WSACloseSocket and WSACleanu

  • 17 years ago

    Hi all,


    I have a problem with some code that I submittet to Planet Source Code


    The problem is that if you start a server and then 1 or more clients that it does not releases the ports after closing the clients. The clients did call a SACloseSocket and WSACleanup. Even closing the application does not free the ports. You can see this when you keep on opening and closing clients. You can see the port number adding up


    If you look at the socket handle it does rese this, but the port remains in use.


    Also adding the folowing line does not help.
    If WSAIsBlocking() Then WSACancelBlockingCall


    Does anyone have an idea why this happens and how to solve this?

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint Exupéry