macula_quic_conn_callback (macula v0.20.5)

View Source

QUIC connection callback module for Macula. Implements quicer_connection behavior to handle connection lifecycle.

Summary

Functions

Handle connection closed

Handle connection established

Handle other messages

Initialize connection callback state

Handle local address changed

Handle new connection With quicer_server, streams are delivered automatically via new_stream/3

Handle new stream With quicer_server, ALL streams are delivered here (not just orphans) Forward them to the gateway for processing

Handle NST received (not used for server)

Handle peer address changed (NAT rebinding) This callback is triggered when the peer's observed address changes, typically due to NAT rebinding. We need to: 1. Log the address change 2. Invalidate cached NAT profile for the peer 3. Update connection tracking

Handle peer needs streams

Handle connection resumed

Handle connection shutdown

Handle streams available

Handle transport shutdown

Functions

closed(Conn, Flags, State)

Handle connection closed

connected(Conn, Flags, State)

Handle connection established

handle_info(Info, State)

Handle other messages

init(ConnOpts)

Initialize connection callback state

local_address_changed(Conn, NewAddr, State)

Handle local address changed

new_conn(Conn, ConnProps, State)

Handle new connection With quicer_server, streams are delivered automatically via new_stream/3

new_stream(Stream, Props, State)

Handle new stream With quicer_server, ALL streams are delivered here (not just orphans) Forward them to the gateway for processing

nst_received(Conn, Data, State)

Handle NST received (not used for server)

peer_address_changed(Conn, NewAddr, State)

Handle peer address changed (NAT rebinding) This callback is triggered when the peer's observed address changes, typically due to NAT rebinding. We need to: 1. Log the address change 2. Invalidate cached NAT profile for the peer 3. Update connection tracking

peer_needs_streams(Conn, Undefined, State)

Handle peer needs streams

resumed(Conn, Data, State)

Handle connection resumed

shutdown(Conn, Reason, State)

Handle connection shutdown

streams_available(Conn, _, State)

Handle streams available

transport_shutdown(Conn, _, State)

Handle transport shutdown