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.
 
 
 
 
 
 

28 regels
595 B

  1. #include "IZ_websocket.h"
  2. void IZ_WebsocketInitialize(IZ_Websocket* ws) {
  3. ws->context = NULL;
  4. ws->interrupted = false;
  5. }
  6. IZ_ProcedureResult IZ_WebsocketHandle(IZ_Websocket* ws) {
  7. return lws_service_tsi(ws->context, -1, 0);
  8. }
  9. void IZ_WebsocketCancelService(IZ_Websocket* ws) {
  10. ws->interrupted = true;
  11. lws_cancel_service(ws->context);
  12. }
  13. void IZ_WebsocketTeardown(IZ_Websocket* ws) {
  14. lws_context_destroy(ws->context);
  15. ws->context = NULL;
  16. }
  17. void IZ_WebsocketDestroyMessage(void* msg_raw) {
  18. IZ_WebsocketMessage* msg = msg_raw;
  19. free(msg->payload);
  20. msg->payload = NULL;
  21. msg->len = 0;
  22. }