ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
connection_handle.c
Go to the documentation of this file.
1
8 if (!handle) {
9 return;
10 }
11
12 *handle = (connection_handle_t){0};
14}
15
17 if (!handle) {
18 return;
19 }
20
21 if (handle->transport) {
22 acip_transport_close(handle->transport);
24 handle->transport = NULL;
25 }
26
27 if (handle->owner && handle->owner_destroy) {
28 handle->owner_destroy(handle->owner);
29 }
30
31 handle->owner = NULL;
32 handle->owner_destroy = NULL;
34}
void connection_handle_cleanup(connection_handle_t *handle)
void connection_handle_init(connection_handle_t *handle)
Shared connection ownership handle for TCP and WebSocket clients.
acip_transport_t * transport
void(* owner_destroy)(void *owner)
acip_transport_type_t transport_type
void acip_transport_destroy(acip_transport_t *transport)
Destroy transport and free all resources.
@ ACIP_TRANSPORT_TCP
Raw TCP socket.
Definition transport.h:94