A websocket connection.
More...
template<typename Adaptor>
class crow::websocket::Connection< Adaptor >
A websocket connection.
◆ Connection()
template<typename Adaptor >
Constructor for a connection.
Requires a request with an "Upgrade: websocket" header.
Automatically handles the handshake.
◆ dispatch()
template<typename Adaptor >
template<typename CompletionHandler >
Send data through the socket.
◆ post()
template<typename Adaptor >
template<typename CompletionHandler >
Send data through the socket and return immediately.
◆ send_ping()
template<typename Adaptor >
◆ send_pong()
template<typename Adaptor >
◆ send_binary()
template<typename Adaptor >
◆ send_text()
template<typename Adaptor >
◆ close()
template<typename Adaptor >
◆ get_remote_ip()
template<typename Adaptor >
◆ build_header()
template<typename Adaptor >
Generate the websocket headers using an opcode and the message size (in bytes).
◆ start()
template<typename Adaptor >
Send the HTTP upgrade response.
Finishes the handshake process, then starts reading messages from the socket.
◆ do_read()
template<typename Adaptor >
Read a websocket message.
Involves:
Handling headers (opcodes, size).
Unmasking the payload.
Reading the actual payload.
◆ is_FIN()
template<typename Adaptor >
Check if the FIN bit is set.
◆ opcode()
template<typename Adaptor >
Extract the opcode from the header.
◆ handle_fragment()
template<typename Adaptor >
Process the payload fragment.
Unmasks the fragment, checks the opcode, merges fragments into 1 message body, and calls the appropriate handler.
◆ do_write()
template<typename Adaptor >
Send the buffers' data through the socket.
Also destroyes the object if the Close flag is set.
◆ check_destroy()
template<typename Adaptor >
◆ userdata() [1/2]
void crow::websocket::connection::userdata |
( |
void * |
u | ) |
|
|
inlineinherited |
◆ userdata() [2/2]
void* crow::websocket::connection::userdata |
( |
| ) |
|
|
inlineinherited |
◆ adaptor_
template<typename Adaptor >
◆ sending_buffers_
template<typename Adaptor >
◆ write_buffers_
template<typename Adaptor >
◆ buffer_
template<typename Adaptor >
◆ is_binary_
template<typename Adaptor >
◆ message_
template<typename Adaptor >
◆ fragment_
template<typename Adaptor >
◆ state_
template<typename Adaptor >
◆ remaining_length16_
template<typename Adaptor >
◆ remaining_length_
template<typename Adaptor >
◆ close_connection_
template<typename Adaptor >
◆ is_reading
template<typename Adaptor >
◆ has_mask_
template<typename Adaptor >
◆ mask_
template<typename Adaptor >
◆ mini_header_
template<typename Adaptor >
◆ has_sent_close_
template<typename Adaptor >
◆ has_recv_close_
template<typename Adaptor >
◆ error_occured_
template<typename Adaptor >
◆ pong_received_
template<typename Adaptor >
◆ is_close_handler_called_
template<typename Adaptor >
◆ open_handler_
template<typename Adaptor >
◆ message_handler_
template<typename Adaptor >
◆ close_handler_
template<typename Adaptor >
◆ error_handler_
template<typename Adaptor >
◆ accept_handler_
template<typename Adaptor >
◆ userdata_
void* crow::websocket::connection::userdata_ |
|
privateinherited |
The documentation for this class was generated from the following file: