Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialOnConn ¶
DialOnConn opens a QUIC connection to addr over an already-bound UDP socket. Not migratable on purpose: migration binds a fresh socket, which the relay sees as unpaired and drops.
func ListenOnConn ¶
func ListenOnConn(udp net.PacketConn) (net.Listener, error)
ListenOnConn serves QUIC on an already-bound UDP socket. The relay pairs by source address, so the registered socket must be the one QUIC listens on. Closing the listener closes it.
Types ¶
type MigratableConn ¶
type MigratableConn struct {
net.Conn // the one-stream adapter (quicConn)
// contains filtered or unexported fields
}
MigratableConn is a QUIC-backed net.Conn dialed on an explicit quic.Transport, so the connection can migrate to a fresh local UDP socket (Wi-Fi -> LTE) while the stream and everything layered on it (SecureConn, gRPC) survive untouched. The plain Transport.Dial uses quic.DialAddr, whose connection cannot AddPath.
func DialQUICMigratable ¶
func DialQUICMigratable(ctx context.Context, addr string) (*MigratableConn, error)
DialQUICMigratable dials addr over QUIC on an explicit transport and returns the stream as a migratable net.Conn.
func (*MigratableConn) Close ¶
func (m *MigratableConn) Close() error
Close tears down the stream, the connection, and every transport it ever used.
type Transport ¶
type Transport interface {
// Dial connects to addr and returns a net.Conn ready to carry gRPC.
Dial(ctx context.Context, addr string) (net.Conn, error)
// Listen returns a net.Listener yielding gRPC-ready conns.
Listen(addr string) (net.Listener, error)
}
Transport establishes gRPC-ready net.Conns over a wire protocol. Two implementations: TCP (the fast bulk data plane) and QUIC (migration-capable: the always-on control channel and the degraded-link fallback). One interface covers both uniformly.