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.
 
 
 
 
 
 

63 lines
1.4 KiB

  1. #ifndef IZ_WSCLIENT_H
  2. #define IZ_WSCLIENT_H
  3. #include "../../common/IZ_common.h"
  4. #include "../core/IZ_websocket.h"
  5. typedef struct {
  6. struct lws_context *context;
  7. struct lws_vhost *vhost;
  8. const struct lws_protocols *protocol;
  9. lws_sorted_usec_list_t sul;
  10. struct lws_ring *ring; /* ringbuffer holding unsent messages */
  11. u32 tail;
  12. struct lws_client_connect_info i;
  13. struct lws *client_wsi;
  14. const char* address;
  15. const char* path;
  16. u16* port;
  17. const void* app;
  18. } IZ_WSClientVHostData;
  19. typedef struct {
  20. struct lws_ring *ring;
  21. u32 tail;
  22. unsigned char flow_controlled: 1;
  23. } IZ_WSClientSessionData;
  24. typedef struct {
  25. const char* host;
  26. const char* path;
  27. u16 port;
  28. } IZ_WSClientInitializeParams;
  29. typedef IZ_WSClientInitializeParams IZ_NetInitializeParams;
  30. IZ_ProcedureResult IZ_WSClientInitialize(IZ_Websocket*, IZ_WSClientInitializeParams);
  31. IZ_ProcedureResult IZ_WSClientHandle(IZ_Websocket*);
  32. void IZ_WSClientTeardown(IZ_Websocket*);
  33. void IZ_WSClientCancelService(IZ_Websocket*);
  34. IZ_ProcedureResult IZ_WSClientProtocolInitialize(struct lws*, void*);
  35. void IZ_WSClientProtocolTeardown(struct lws*);
  36. IZ_ProcedureResult IZ_WSClientConnectionError(struct lws*, void*);
  37. IZ_ProcedureResult IZ_WSClientOnOpen(struct lws*, IZ_WSClientSessionData*);
  38. void IZ_WSClientOnClose(struct lws*);
  39. IZ_ProcedureResult IZ_WSClientWritable(struct lws*);
  40. void IZ_WSClientOnReceive(struct lws*, IZ_WSClientSessionData*, void*, size_t);
  41. #endif