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_callbacks_t Struct Reference

Callbacks and operations used by network connection callbacks. Packet payloads are borrowed until return. closing stops application producers; closed releases application state after the transport and callbacks have drained. An open failure still receives closing/closed, including partial application init. More...

#include <include/ascii-chat/network/connection.h>

Data Fields

asciichat_error_t(* open )(network_connection_t *, void *)
asciichat_error_t(* packet )(network_connection_t *, packet_type_t, const void *, size_t, void *)
asciichat_error_t(* closing )(network_connection_t *, void *)
void(* closed )(network_connection_t *, void *)

Detailed Description

Callbacks and operations used by network connection callbacks. Packet payloads are borrowed until return. closing stops application producers; closed releases application state after the transport and callbacks have drained. An open failure still receives closing/closed, including partial application init.

All hooks run serially for a connection, outside backend event loops.

Definition at line 25 of file include/ascii-chat/network/connection.h.

Field Documentation

◆ closed

void(* network_connection_callbacks_t::closed) (network_connection_t *, void *)

Definition at line 29 of file include/ascii-chat/network/connection.h.

◆ closing

asciichat_error_t(* network_connection_callbacks_t::closing) (network_connection_t *, void *)

Definition at line 28 of file include/ascii-chat/network/connection.h.

◆ open

asciichat_error_t(* network_connection_callbacks_t::open) (network_connection_t *, void *)

Definition at line 26 of file include/ascii-chat/network/connection.h.

◆ packet

asciichat_error_t(* network_connection_callbacks_t::packet) (network_connection_t *, packet_type_t, const void *, size_t, void *)

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