|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
WebSocket client implementation. More...
Go to the source code of this file.
Functions | |
| websocket_client_t * | websocket_client_create (void) |
| Create and initialize WebSocket client. | |
| void | websocket_client_destroy (websocket_client_t **client_ptr) |
| Destroy WebSocket client and free resources. | |
| bool | websocket_client_is_active (const websocket_client_t *client) |
| Check if connection is currently active. | |
| bool | websocket_client_is_lost (const websocket_client_t *client) |
| Check if connection was lost. | |
| void | websocket_client_signal_lost (websocket_client_t *client) |
| Signal that connection was lost. | |
| void | websocket_client_close (websocket_client_t *client) |
| Close connection gracefully. | |
| void | websocket_client_shutdown (websocket_client_t *client) |
| Shutdown connection forcefully. | |
| acip_transport_t * | websocket_client_connect (websocket_client_t *client, const char *url, struct crypto_context_t *crypto_ctx) |
| Establish WebSocket connection to server. | |
| acip_transport_t * | websocket_client_get_transport (const websocket_client_t *client) |
| Get active transport instance. | |
WebSocket client implementation.
Thin implementation that delegates to acip_websocket_client_transport_create() for actual connection setup. Mirrors tcp_client.c structure for consistency.
Definition in file lib/network/websocket/client.c.
| void websocket_client_close | ( | websocket_client_t * | client | ) |
Close connection gracefully.
Definition at line 100 of file lib/network/websocket/client.c.
| acip_transport_t * websocket_client_connect | ( | websocket_client_t * | client, |
| const char * | url, | ||
| struct crypto_context_t * | crypto_ctx | ||
| ) |
Establish WebSocket connection to server.
Delegates to acip_websocket_client_transport_create() which handles:
Definition at line 141 of file lib/network/websocket/client.c.
References acip_websocket_client_transport_create().
Referenced by connection_attempt_tcp(), and connection_attempt_websocket().
| websocket_client_t * websocket_client_create | ( | void | ) |
Create and initialize WebSocket client.
Definition at line 24 of file lib/network/websocket/client.c.
Referenced by connection_attempt_tcp(), connection_attempt_websocket(), and session_client_like_run().
| void websocket_client_destroy | ( | websocket_client_t ** | client_ptr | ) |
Destroy WebSocket client and free resources.
Definition at line 47 of file lib/network/websocket/client.c.
References acip_transport_destroy().
Referenced by connection_attempt_tcp(), connection_attempt_websocket(), connection_context_cleanup(), and session_client_like_run().
| acip_transport_t * websocket_client_get_transport | ( | const websocket_client_t * | client | ) |
Get active transport instance.
Definition at line 175 of file lib/network/websocket/client.c.
| bool websocket_client_is_active | ( | const websocket_client_t * | client | ) |
Check if connection is currently active.
Definition at line 68 of file lib/network/websocket/client.c.
| bool websocket_client_is_lost | ( | const websocket_client_t * | client | ) |
Check if connection was lost.
Definition at line 78 of file lib/network/websocket/client.c.
| void websocket_client_shutdown | ( | websocket_client_t * | client | ) |
Shutdown connection forcefully.
Definition at line 117 of file lib/network/websocket/client.c.
| void websocket_client_signal_lost | ( | websocket_client_t * | client | ) |
Signal that connection was lost.
Definition at line 88 of file lib/network/websocket/client.c.