• 0

Safe Socket


Question

I'm in the process of developing a small Java game. Long story short what is a Socket number I can use that isn't already occupied by Windows, Linux, BSD, and OS X?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Usually anything above 1024 is free for personal use, although 1863 is used by MSN Messenger, and 5190 for AOL Messenger.

I'm sure theres a whole list on the net somewhere, just have a look, but I'd imagine you could pick a port number such as 34562 and you'd be fine

Link to comment
Share on other sites

  • 0

Port 1-1023 are often called "server ports", easy numbers that are used by services on servers.

Port 1024 and above are called ephemeral ports, or "client ports". Free to use, but might be assigned to a service/protocol by IANA.

There are also private ports that no operating system are supposed to use. Priavte ports can not be registered.

The private ports, for both TCP and UDP are ranging between 49152 and 65535.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.