diff --git a/main.cpp b/main.cpp index 1f3f7e6..2c5e780 100644 --- a/main.cpp +++ b/main.cpp @@ -102,15 +102,23 @@ static void client() { // int main(int argc, char **argv) { - if (fork() == 0) { - sleep(1); - client(); - } - else { - server(); - printf("Press enter to exit...\n"); - getchar(); - } + printf("[S] Starting server on port %d\n", SERVER_PORT); + Server server; + if (!server.start(SERVER_PORT, 1)) { + printf("[S] Unable to start server\n"); + return 1; + } + + + printf("[S] Connecting to server on port %d\n", SERVER_PORT); + Client client; + if (!client.connect("localhost", SERVER_PORT)) { + printf("[C] Unable to connect to server\n"); + return 1; + } + + + return 0; } diff --git a/metacall.project b/metacall.project deleted file mode 100644 index 202ab09..0000000 --- a/metacall.project +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - - - - - - - - - - - - - - - - - - - - - None - - - - - - - - - diff --git a/metacall.workspace b/metacall.workspace deleted file mode 100644 index e07dc23..0000000 --- a/metacall.workspace +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - -