I got a problem with my UDP server on linux. On windows everything's fine, and it's suposed to be the same on linux.
The problem is on this line bind(sckHandle, (struct sockaddr*)(SvrAddress), sizeof(sockaddr_in))
except that this line is ok. I found on a forum a problem similar and the dude answered that it was solved, it was a problem with his firewall settings on linux.
I searched to modify them with FireStarter but could not find where was the problem.
Well i don't know 'cause i didn't manage to find how it works, but i found the error str "Address Already In Use" But who would use the port 7153 and the IP address is equivalent to INADDR_ANY
Machine A does that because it wants to give the other side (machine B) time to realize that machine A is
no longer responding and close its side of the connection. Otherwise, if a different process starts on Machine A
and opens the same port, it will receive packets that it can't comprehend.
To turn off this behavior, you have to set the SO_REUSEADDR socket option.
One is to create a temporary file with a well-known name somewhere (say /tmp) at the beginning of your program.
If it fails to create the file because it already exists, then you know another instance is running.
Another is to create a well-known semaphore at the beginning of your program. If it fails to create the semaphore
because it already exists, then you know another instance is running.