Browse Source

Update network thread function identifier

Use appropriate identifier for function that runs network thread.
feature/data-structs
TheoryOfNekomata 2 years ago
parent
commit
5b916f263d
4 changed files with 4 additions and 5 deletions
  1. +1
    -1
      src/packages/game/IZ_app.c
  2. +0
    -2
      src/packages/game/IZ_app.h
  3. +1
    -2
      src/packages/game/net/IZ_app.c
  4. +2
    -0
      src/packages/game/net/IZ_app.h

+ 1
- 1
src/packages/game/IZ_app.c View File

@@ -46,7 +46,7 @@ IZ_ProcedureResult IZ_AppInitialize(struct IZ_App* app, u8 argc, const char* arg
return IZ_APP_RUN_INPUT_INIT_ERROR; return IZ_APP_RUN_INPUT_INIT_ERROR;
} }


if (IZ_NetInitialize(&app->net_state, app, IZ_AppConnect, config_path, argc, argv)) {
if (IZ_NetInitialize(&app->net_state, app, IZ_AppRunNetworkingThread, config_path, argc, argv)) {
return IZ_APP_RUN_NETWORKING_ERROR; return IZ_APP_RUN_NETWORKING_ERROR;
} }




+ 0
- 2
src/packages/game/IZ_app.h View File

@@ -28,6 +28,4 @@ typedef struct IZ_App {


IZ_ProcedureResult IZ_AppRun(struct IZ_App*, u8, const char**); IZ_ProcedureResult IZ_AppRun(struct IZ_App*, u8, const char**);


IZ_ProcedureResult IZ_AppConnect(void*);

#endif #endif

+ 1
- 2
src/packages/game/net/IZ_app.c View File

@@ -259,8 +259,7 @@ void IZ_WSClientOnReceive(struct lws* wsi, IZ_WSClientSessionData* pss, void* in
} }
} }


IZ_ProcedureResult IZ_AppConnect(void* app_raw) {
struct IZ_App* app = app_raw;
IZ_ProcedureResult IZ_AppRunNetworkingThread(struct IZ_App* app) {
IZ_NetState* net_state = IZ_AppGetNetState(app); IZ_NetState* net_state = IZ_AppGetNetState(app);


if (IZ_WSClientInitialize(&net_state->ws, net_state->params)) { if (IZ_WSClientInitialize(&net_state->ws, net_state->params)) {


+ 2
- 0
src/packages/game/net/IZ_app.h View File

@@ -50,4 +50,6 @@ void IZ_AppBindConnection(struct IZ_App*, struct lws*);


void IZ_AppHandleOutboundNetworking(struct IZ_App*); void IZ_AppHandleOutboundNetworking(struct IZ_App*);


IZ_ProcedureResult IZ_AppRunNetworkingThread(struct IZ_App*);

#endif #endif

Loading…
Cancel
Save