Finding the amount of ports left
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Finding the amount of ports left

  1. #1
    Join Date
    Mar 2010
    Posts
    48

    Finding the amount of ports left

    I am currently development an application which sends a lot of web requests in a very short space of time continuously(No, it is not a DoS application, to clear any accusations up). I am running multiple threads to speed up the process. However, my client has reported the program crashes. After much searching, I found out that after a port is closed, before it is made available again, it waits for a period according to TIME_WAIT. So my theory is that this program is easily using up the 4000 available ports and the program is crashing.

    My question is, how do I find out how many ports are available so that I can avoid this? Another option is of course finding the TIME_WAIT variable out and manually keeping record of how many ports are available, however this is not the best method.

    Thank you.

  2. #2
    Join Date
    Mar 2010
    Posts
    48

    Re: Finding the amount of ports left

    Bump.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center