Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] How to check if a port is already bound  (Read 3796 times)

0 Members and 1 Guest are viewing this topic.

gmagno

  • Newbie
  • *
  • Posts: 4
    • View Profile
[SOLVED] How to check if a port is already bound
« on: March 24, 2010, 04:52:44 pm »
Hello,

This is my first post, and I'd like to say thank you for this nice library.

I can't say I looked all over the forum for posts related to my question, I apologize if this is already answered somewhere else.

So, is it possible to check if a certain port number is already bound to a UDP socket?

Thank you in advance

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
[SOLVED] How to check if a port is already bound
« Reply #1 on: March 24, 2010, 07:50:39 pm »
Binding a socket to a port that is not available should return an error.

If what you want is a free port, you can use 0 so that the system will choose for you.
Laurent Gomila - SFML developer

gmagno

  • Newbie
  • *
  • Posts: 4
    • View Profile
[SOLVED] How to check if a port is already bound
« Reply #2 on: March 24, 2010, 07:58:48 pm »
[SOLVED]

Thank you.