diff --git a/soak/client.c b/soak/client.c index 735a0a3..f41d652 100644 --- a/soak/client.c +++ b/soak/client.c @@ -276,12 +276,6 @@ int main(int argc, char *argv[]) NBN_UDP_Register(); // Register the UDP driver #endif // __EMSCRIPTEN__ - if (Soak_Init(argc, argv) < 0) - { - Soak_LogError("Failed to initialize soak test"); - return 1; - } - SoakOptions options = Soak_GetOptions(); unsigned int channel_count = options.channel_count; unsigned int message_count = options.message_count; @@ -300,6 +294,12 @@ int main(int argc, char *argv[]) #endif } + if (Soak_Init(argc, argv) < 0) + { + Soak_LogError("Failed to initialize soak test"); + return 1; + } + for (int c = 0; c < channel_count; c++) { SoakChannel *channel = &channels[c]; diff --git a/soak/server.c b/soak/server.c index 8aaf9ed..c18c5fd 100644 --- a/soak/server.c +++ b/soak/server.c @@ -346,24 +346,24 @@ int main(int argc, char *argv[]) NBN_WebRTC_C_Register(); // Register native WebRTC driver #endif -#endif // __EMSCRIPTEN__ +#endif // __EMSCRIPTEN__ - if (Soak_Init(argc, argv) < 0) + if (NBN_GameServer_Start(SOAK_PROTOCOL_NAME, SOAK_PORT)) { - Soak_LogError("Failed to initialize soak test"); + Soak_LogError("Failed to start game server"); return 1; } - NBN_GameServer_Debug_RegisterCallback(NBN_DEBUG_CB_MSG_ADDED_TO_RECV_QUEUE, (void *)Soak_Debug_PrintAddedToRecvQueue); - - if (NBN_GameServer_Start(SOAK_PROTOCOL_NAME, SOAK_PORT)) + if (Soak_Init(argc, argv) < 0) { - Soak_LogError("Failed to start game server"); + Soak_LogError("Failed to initialize soak test"); return 1; } + NBN_GameServer_Debug_RegisterCallback(NBN_DEBUG_CB_MSG_ADDED_TO_RECV_QUEUE, (void *)Soak_Debug_PrintAddedToRecvQueue); + int ret = Soak_MainLoop(Tick, NULL); NBN_GameServer_Stop(); diff --git a/soak/soak.c b/soak/soak.c index 3f2e967..eccc1cb 100644 --- a/soak/soak.c +++ b/soak/soak.c @@ -74,10 +74,6 @@ int Soak_Init(int argc, char *argv[]) NBN_GameClient_RegisterReliableChannel(i); } -#ifdef SOAK_ENCRYPTION - NBN_GameClient_EnableEncryption(); -#endif - NBN_GameClient_RegisterMessage(SOAK_MESSAGE, (NBN_MessageBuilder)SoakMessage_CreateIncoming, (NBN_MessageDestructor)SoakMessage_Destroy, @@ -92,10 +88,6 @@ int Soak_Init(int argc, char *argv[]) NBN_GameServer_RegisterReliableChannel(i); } -#ifdef SOAK_ENCRYPTION - NBN_GameServer_EnableEncryption(); -#endif - NBN_GameServer_RegisterMessage(SOAK_MESSAGE, (NBN_MessageBuilder)SoakMessage_CreateIncoming, (NBN_MessageDestructor)SoakMessage_Destroy, diff --git a/soak/soak_cli_out b/soak/soak_cli_out new file mode 100644 index 0000000..2e2fc8d --- /dev/null +++ b/soak/soak_cli_out @@ -0,0 +1 @@ +./bin/github-actions/run_soak.sh: line 38: ./client: No such file or directory diff --git a/soak/soak_serv_out b/soak/soak_serv_out new file mode 100644 index 0000000..64a43ed --- /dev/null +++ b/soak/soak_serv_out @@ -0,0 +1 @@ +./bin/github-actions/run_soak.sh: line 18: ./server: No such file or directory