2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

70 rindas
1.5 KiB

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