Wslay - The WebSocket libraryΒΆ
Wslay is a WebSocket library written in C. It implements the protocol version 13 described in RFC 6455. This library offers 2 levels of API: event-based API and frame-based low-level API. For event-based API, it is suitable for non-blocking reactor pattern style. You can set callbacks in various events. For frame-based API, you can send WebSocket frame directly. Wslay only supports data transfer part of WebSocket protocol and does not perform opening handshake in HTTP.
Wslay supports:
- Text/Binary messages.
- Automatic ping reply.
- Callback interface.
- External event loop.
Wslay does not perform any I/O operations for its own. Instead, it offers callbacks for them. This makes Wslay independent on any I/O frameworks, SSL, sockets, etc. This makes Wslay portable across various platforms and the application authors can choose freely I/O frameworks.
See Autobahn test reports: server and client.
This project is hosted at https://github.com/tatsuhiro-t/wslay
Contents:
- Tutorial
- API Reference
- wslay_event_context_server_init, wslay_event_context_client_init, wslay_event_context_free
- wslay_event_config_set_no_buffering
- wslay_event_config_set_max_recv_msg_length
- wslay_event_config_set_callbacks
- wslay_event_config_set_allowed_rsv_bits
- wslay_event_queue_close
- wslay_event_queue_fragmented_msg, wslay_event_queue_fragmented_msg_ex
- wslay_event_queue_msg, wslay_event_queue_msg_ex
- wslay_event_recv
- wslay_event_send
- wslay_event_set_error
- wslay_event_want_read
- wslay_event_want_write
- wslay_event_get_read_enabled
- wslay_event_get_write_enabled
- wslay_event_shutdown_read
- wslay_event_shutdown_write
- wslay_event_get_close_received
- wslay_event_get_close_sent
- wslay_event_get_status_code_received
- wslay_event_get_status_code_sent
- wslay_event_get_queued_msg_count
- wslay_event_get_queued_msg_length