You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a fairly basic uWS::SSLApp that has websocket clients listen to various topics. The messages I want to send for these topics arrive over UDP, so I would like to add a UDP socket to the event loop and publish based on data received from it. I create a socket, bind it, etc but I am getting stuck here:
/* Associate this poll with a socket descriptor and poll type */
WIN32_EXPORT void us_poll_init(struct us_poll_t *p, LIBUS_SOCKET_DESCRIPTOR fd, int poll_type);
/* Start, change and stop polling for events */
WIN32_EXPORT void us_poll_start(struct us_poll_t *p, struct us_loop_t *loop, int events);
What should poll_type and events be? I thought I should use POLL_TYPE_POLLING_IN and LIBUS_SOCKET_READABLE but these don't appear to be part of the libusockets.h public header.
Also after starting the poll, how / where I do I receive the events and read the data in the uWS::SSLApp loop?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have created a fairly basic
uWS::SSLApp
that has websocket clients listen to various topics. The messages I want to send for these topics arrive over UDP, so I would like to add a UDP socket to the event loop and publish based on data received from it. I create a socket, bind it, etc but I am getting stuck here:What should
poll_type
andevents
be? I thought I should usePOLL_TYPE_POLLING_IN
andLIBUS_SOCKET_READABLE
but these don't appear to be part of thelibusockets.h
public header.Also after starting the poll, how / where I do I receive the events and read the data in the
uWS::SSLApp
loop?Beta Was this translation helpful? Give feedback.
All reactions