#include #include void ConnectionHandler(Networking::TCPConnection &Connection) { Login::RemoteLoginServer LoginServer; ByteArray RawLoginHeader = Connection.ReceiveBytes(); LoginServer.Start(RawLoginHeader); ByteArray RawServerResponse = LoginServer.GetResponse(); Connection.SendBytes(RawServerResponse); } int main() { Networking::TCPServer Server; // Create an instance of the TCP server. if(!Server.Start(3884)) { printf("[FAIL] Failed to initialise server. (%08lx)\n", WSAGetLastError()); system("pause"); return 1; } // Add a connection handler to the server. Server += ConnectionHandler; // Accept incoming connections. while(true) { Server.AcceptConnection(); } return 0; }