How to find a free port number


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: How to find a free port number

  1. #1
    Jussi Guest

    How to find a free port number


    I'm using winsock and I'd like to find a free port number, which I could use
    with one component that communicates using ports. Could anyone help me?

    - Jussi

  2. #2
    Dean Earley Guest

    Re: How to find a free port number

    I think that if you set the local port to 0, then it will use a free one
    automatically when you tell it to listen

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "Jussi" <jussi.seppala@liinos.com> wrote in message
    news:3a92396f$1@news.devx.com...
    >
    > I'm using winsock and I'd like to find a free port number, which I could

    use
    > with one component that communicates using ports. Could anyone help me?
    >
    > - Jussi




  3. #3
    Dean Earley Guest

    Re: How to find a free port number

    I think that if you set the local port to 0, then it will use a free one
    automatically when you tell it to listen

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "Jussi" <jussi.seppala@liinos.com> wrote in message
    news:3a92396f$1@news.devx.com...
    >
    > I'm using winsock and I'd like to find a free port number, which I could

    use
    > with one component that communicates using ports. Could anyone help me?
    >
    > - Jussi




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center