-
Notifications
You must be signed in to change notification settings - Fork 55
MTY_WebSocketRead
chrisd1100 edited this page Aug 25, 2022
·
1 revision
Read a message from a WebSocket.
MTY_Async MTY_WebSocketRead(
MTY_WebSocket * ctx,
uint32_t timeout,
char * msg,
size_t size
);
ctx
(MTY_WebSocket *
)
An MTY_WebSocket
.
timeout
(uint32_t
)
Time to wait in milliseconds for a message to become available.
msg
(char *
)
Output message buffer.
size
(size_t
)
Size in bytes of msg
.
MTY_ASYNC_OK
means a message has been successfully read into msg
.
MTY_ASYNC_CONTINUE
means the timeout
has been reached without a message.
MTY_ASYNC_ERROR
means an error has occurred. Call MTY_GetLog
for details.