Legacy GM Networking - all-in-one(client-server) server example



I´ve been searching for network tutorials all over but I can´t find one that has a all-in-one server example.

My project is a basic 2 client game where one of them will be the server.
I already managed to make communication between 2 clients and a server separately. Running 3 separate executables.
But if I create a client in the same executable/project of the server, the IDs kind of get lost/different.

Because I´m new to network stuff, I would like to see a tutorial/example of this since my code is might be a bit messy and I´d to start it from scratch.

Thanks :)