9#ifndef __CWIST_WS_ASYNC_INTERNAL_H__
10#define __CWIST_WS_ASYNC_INTERNAL_H__
struct cwist_reactor cwist_reactor_t
Reactor-driven, callback-shaped non-blocking WebSocket API (C1M mode).
struct cwist_websocket_async cwist_websocket_async
void(* cwist_ws_on_message_t)(cwist_websocket_async *ws, cwist_ws_frame *frame, void *user_data)
Callback invoked for each complete WebSocket message on the C1M path.
void(* cwist_ws_on_close_t)(cwist_websocket_async *ws, void *user_data)
Optional teardown hook for the callback-shaped WS path (see cwist_websocket_async_attach_ex in ws_asy...
void cwist_websocket_async_close_code(cwist_websocket_async *ws, uint16_t code)
Initiate the WebSocket close handshake with a CLOSE frame carrying a status code.
cwist_websocket_async * cwist_websocket_async_attach_ex(int fd, cwist_reactor_t *reactor, cwist_ws_on_message_t on_message, cwist_ws_on_close_t on_close, void *user_data, const uint8_t *initial, size_t initial_len)
Attach variant that reports the connection handle and teardown.
bool cwist_websocket_async_attach(int fd, cwist_reactor_t *reactor, cwist_ws_on_message_t on_message, void *user_data, const uint8_t *initial, size_t initial_len)
Take ownership of a connected, upgraded fd and drive it reactively.