2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 lines
876 B

  1. #ifndef IZ_NET_SERVER_H
  2. #define IZ_NET_SERVER_H
  3. #include <minIni.h>
  4. #include "../config/IZ_config.h"
  5. #include "../common/IZ_common.h"
  6. #include "core/IZ_websocket.h"
  7. #include "svc/IZ_wsserver.h"
  8. #define IZ_DEFAULT_MOTD ""
  9. typedef struct {
  10. u16 port;
  11. char name[64];
  12. char motd[128];
  13. } IZ_NetServerConfig;
  14. typedef struct {
  15. IZ_NetServerConfig config;
  16. IZ_NetBinding ws;
  17. } IZ_NetServerState;
  18. static IZ_NetServerState IZ_NET_SERVER_DEFAULT_STATE = {
  19. .config = {
  20. .port = 42069,
  21. .name = IZ_APP_NAME " Server",
  22. .motd = IZ_DEFAULT_MOTD,
  23. },
  24. .ws = {
  25. .interrupted = false,
  26. .context = NULL,
  27. .connection = NULL,
  28. .user_data = NULL,
  29. },
  30. };
  31. IZ_ProcedureResult IZ_NetInitialize(IZ_NetServerState*, void*, const char*, u8, const char*[]);
  32. IZ_ProcedureResult IZ_NetSaveConfig(IZ_NetServerState*, const char*);
  33. void IZ_NetServerCancelService(IZ_NetServerState*);
  34. #endif