ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
network_connection Struct Reference

network server is intentionally a small, concrete record. Fields such as Config Module, listener, websocket, websocket_thread give callers the identity and current value they need. It is normally borrowed from, or owned by, the surrounding subsystem—not independently managed. More...

Data Fields

network_server_t * server
network_connection_callbacks_t callbacks
void * callback_context
network_server_config_t policy
network_connection_t * next
acip_transport_t * transport
quic_endpoint_t * owned_quic_endpoint
platform_event_stream_t * stream
packet_decoder_t decoder
acip_security_t security
acip_security_t * adopted_security
bool security_claimed
bool security_options
atomic_ptr_t context
char peer [256]
uint16_t port
atomic_t state
atomic_t pins
bool secure
bool opened
bool authenticated_peer
bool cleanup_failed
uint64_t started
uint64_t last_packet
uint64_t partial_since
const void * input
size_t input_length
asciichat_error_t result

Detailed Description

network server is intentionally a small, concrete record. Fields such as Config Module, listener, websocket, websocket_thread give callers the identity and current value they need. It is normally borrowed from, or owned by, the surrounding subsystem—not independently managed.

network connection keeps the values that move through the subsystem: server, callbacks, callback_context, policy. Some members are pointers into caller- or subsystem-owned memory, so lifetime follows the API that populated them rather than the struct copy itself.

Definition at line 60 of file lib/network/connection.c.

Field Documentation

◆ adopted_security

acip_security_t* network_connection::adopted_security

◆ authenticated_peer

bool network_connection::authenticated_peer

Definition at line 77 of file lib/network/connection.c.

◆ callback_context

void* network_connection::callback_context

Definition at line 63 of file lib/network/connection.c.

Referenced by network_connection_run().

◆ callbacks

network_connection_callbacks_t network_connection::callbacks

Definition at line 62 of file lib/network/connection.c.

Referenced by network_connection_run().

◆ cleanup_failed

bool network_connection::cleanup_failed

Definition at line 77 of file lib/network/connection.c.

Referenced by network_server_stop().

◆ context

atomic_ptr_t network_connection::context

◆ decoder

packet_decoder_t network_connection::decoder

Definition at line 69 of file lib/network/connection.c.

◆ input

const void* network_connection::input

Definition at line 79 of file lib/network/connection.c.

◆ input_length

size_t network_connection::input_length

Definition at line 80 of file lib/network/connection.c.

◆ last_packet

uint64_t network_connection::last_packet

Definition at line 78 of file lib/network/connection.c.

◆ next

network_connection_t* network_connection::next

Definition at line 65 of file lib/network/connection.c.

Referenced by network_server_foreach(), and network_server_stop().

◆ opened

bool network_connection::opened

Definition at line 77 of file lib/network/connection.c.

Referenced by network_connection_run().

◆ owned_quic_endpoint

quic_endpoint_t* network_connection::owned_quic_endpoint

Definition at line 67 of file lib/network/connection.c.

Referenced by network_connection_open().

◆ partial_since

uint64_t network_connection::partial_since

Definition at line 78 of file lib/network/connection.c.

◆ peer

char network_connection::peer[256]

◆ pins

atomic_t network_connection::pins

Definition at line 76 of file lib/network/connection.c.

Referenced by network_server_foreach().

◆ policy

network_server_config_t network_connection::policy

Definition at line 64 of file lib/network/connection.c.

◆ port

uint16_t network_connection::port

◆ result

asciichat_error_t network_connection::result

Definition at line 81 of file lib/network/connection.c.

Referenced by network_connection_run(), and network_server_stop().

◆ secure

bool network_connection::secure

◆ security

◆ security_claimed

bool network_connection::security_claimed

◆ security_options

bool network_connection::security_options

Definition at line 72 of file lib/network/connection.c.

Referenced by network_connection_prepare_security().

◆ server

network_server_t* network_connection::server

Definition at line 61 of file lib/network/connection.c.

Referenced by network_connection_run().

◆ started

uint64_t network_connection::started

Definition at line 78 of file lib/network/connection.c.

◆ state

atomic_t network_connection::state

◆ stream

platform_event_stream_t* network_connection::stream

Definition at line 68 of file lib/network/connection.c.

◆ transport


The documentation for this struct was generated from the following file: