Search code examples
javasocketsnetwork-programmingportnetwork-traffic

Networking - Using sockets and sometimes getting ghost numbers


I created a Java networking program and every once in a while when I run (it doesn't happen all the time) it I get a ghost number, my sockets receive a number something like -16956754 (its always the same number) and I never send though the sockets a number anywhere close to the number I am receiving. Could it be because I'm getting traffic on the port I am using? I'm using 25565 which is a pretty common port..

If so which port do you recommend to be the least used that will fit a game application?


Solution

  • Solved by changing the port to a non used port.