SyntaxFix
Write A Post
Hire A Developer
Questions
The comment in your code is wrong. INADDR_ANY doesn't put server's IP automatically'. It essentially puts 0.0.0.0, for the reasons explained in mark4o's answer.
INADDR_ANY