You really did a good job with this code!
But I'm now trying to use an external IP instead of only doing a local server. I port forwarded and I know the server is working with the external IP because I managed to send to him sockets from a Port Checker Tool online. But the GameMaker can't connect to the server. Why is that?