macula_quic (macula v0.7.29)
View SourceMain API module for Macula QUIC transport. Provides a simplified wrapper around the quicer library.
Summary
Functions
Accept an incoming connection on a listener. After accepting, the connection needs handshake to complete.
Accept an incoming stream on a connection.
Send data on a stream asynchronously (non-blocking). This returns immediately without waiting for QUIC flow control.
Close a listener, connection, or stream.
Connect to a QUIC server. Options: {alpn, [Protocol]} - List of ALPN protocols {verify, none | verify_peer} - Certificate verification mode
Start a QUIC listener on the specified port. Options: {cert, CertFile} - Path to PEM certificate file {key, KeyFile} - Path to PEM private key file {alpn, [Protocol]} - List of ALPN protocols (e.g., ["macula"]) {peer_unidi_stream_count, N} - Max unidirectional streams {peer_bidi_stream_count, N} - Max bidirectional streams
Open a new bidirectional stream on a connection.
Receive data from a stream (blocking).
Send data on a stream (blocking).
Functions
Accept an incoming connection on a listener. After accepting, the connection needs handshake to complete.
Accept an incoming stream on a connection.
Send data on a stream asynchronously (non-blocking). This returns immediately without waiting for QUIC flow control.
-spec close(pid()) -> ok.
Close a listener, connection, or stream.
-spec connect(string() | inet:ip_address(), inet:port_number(), list(), timeout()) -> {ok, pid()} | {error, term()}.
Connect to a QUIC server. Options: {alpn, [Protocol]} - List of ALPN protocols {verify, none | verify_peer} - Certificate verification mode
-spec listen(inet:port_number(), list()) -> {ok, pid()} | {error, term()}.
Start a QUIC listener on the specified port. Options: {cert, CertFile} - Path to PEM certificate file {key, KeyFile} - Path to PEM private key file {alpn, [Protocol]} - List of ALPN protocols (e.g., ["macula"]) {peer_unidi_stream_count, N} - Max unidirectional streams {peer_bidi_stream_count, N} - Max bidirectional streams
Open a new bidirectional stream on a connection.
Receive data from a stream (blocking).
Send data on a stream (blocking).