Skip to content

Internal structures and states

Christian Huitema edited this page Apr 6, 2020 · 3 revisions

##Contexts and connections

Picoquic code uses 2 main objects types to represent the Quic context (type picoquic_quic_t) and the Quic connection (type picoquic_cnx_t). There is normally just one Quic context per process, and one Quic connection per connection.

The Quic context gathers the information common to all connections, such as for example the length of connection identifiers or the value of the reset secret. The Quic context keeps track of all connections created through the call to picoquic_create_cnx. These lists of connections are used in context level calls, such as:

  • Arrival of a packet on a socket shared by all connections: picoquic_incoming_packet
  • Preparing the next packet from one of the connections: picoquic_prepare_next_packet

The Quic connection context tracks all the state of a connection, either directly or through a set of other objects such as paths or packet contexts.

Clone this wiki locally