From 77b52da44b263df4884be2f35f885d8edccbb6fa Mon Sep 17 00:00:00 2001 From: boris Date: Wed, 19 Dec 2018 00:13:24 +1300 Subject: added new loader project :) merry christmas --- csgo-loader/csgo-server/Server.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 csgo-loader/csgo-server/Server.cpp (limited to 'csgo-loader/csgo-server/Server.cpp') diff --git a/csgo-loader/csgo-server/Server.cpp b/csgo-loader/csgo-server/Server.cpp new file mode 100644 index 0000000..ca6deb4 --- /dev/null +++ b/csgo-loader/csgo-server/Server.cpp @@ -0,0 +1,33 @@ +#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; +} \ No newline at end of file -- cgit v1.2.3