masque_ip_h1_client_session (masque v0.7.0)

View Source

Client-side CONNECT-IP session (RFC 9484) over HTTP/1.1.

Runs the handshake as an HTTP/1.1 Upgrade (Upgrade: connect-ip) and, after the 101 response, drives RFC 9297 capsules directly on the raw TLS socket.

Control-plane capsules (ADDRESS_ASSIGN, ADDRESS_REQUEST, ROUTE_ADVERTISEMENT) are encoded via masque_ip_capsule. IP packets ride the DATAGRAM capsule with masque_datagram carrying the context-id || IP bytes payload. Wire format is identical to the h2 / h3 paths so masque_ip_capsule + masque_datagram are reused unchanged; only the transport plumbing differs.

Sibling module of masque_ip_client_session; they do not share state. Keeping them separate avoids leaking the socket-ownership and active-once read model back into the h2/h3 session.

Summary

Functions

assign_addresses(Pid, Assignments)

-spec assign_addresses(pid(), [masque_ip_capsule:address_entry()]) -> ok | {error, term()}.

callback_mode()

closing(Event, Msg, Data)

code_change(OldVsn, State, Data, Extra)

connecting(_, Other, Data)

info(Pid)

init(_)

ip_info(Pid)

-spec ip_info(pid()) -> map().

open(_, Msg, Data)

recv(Pid, Timeout)

request_addresses(Pid, Prefixes)

-spec request_addresses(pid(), [{4 | 6, inet:ip_address(), non_neg_integer()}]) ->
                           {ok, [pos_integer()]} | {error, term()}.

send_capsule(Pid, Type, Value)

send_ip_packet(Pid, Packet)

-spec send_ip_packet(pid(), binary()) -> ok | {error, term()}.

set_mode(Pid, Mode)

start(Target, Opts, Owner)

start_link(Target, Opts, Owner)

stop(Pid)

terminate(Reason, State, Data)