Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CtxTimedOutError is a custom QUIC error code that is used when canceling // writes due to context expiration. CtxTimedOutError quic.ApplicationErrorCode = iota + 1 // OpenStreamError is the error code when failing to opening a stream. OpenStreamError // AcceptStreamError is the error code when failing to accept a stream. AcceptStreamError )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnDialer ¶
type ConnDialer struct { // Conn is the transport to initiate QUIC Sessions on. It can be shared // between clients and servers, because QUIC connection IDs are used to // demux the packets. // // Note: When creating the transport, ensure that the SCMP errors are not // propagated. You can for example use // [github.com/scionproto/scion/pkg/snet.SCMPPropagationStopper]. Otherwise, // the QUIC transport will close the listening side on SCMP errors and enter // a broken state. Transport *quic.Transport // TLSConfig is the client's TLS configuration for starting QUIC connections. TLSConfig *tls.Config // QUICConfig is the client's QUIC configuration. QUICConfig *quic.Config }
ConnDialer dials a net.Conn over a QUIC stream.
type ConnListener ¶
type ConnListener struct { *quic.Listener // contains filtered or unexported fields }
ConnListener wraps a quic.Listener as a net.Listener.
func NewConnListener ¶
func NewConnListener(l *quic.Listener) *ConnListener
NewConnListener constructs a new listener with the appropriate buffers set.
func (*ConnListener) Accept ¶
func (l *ConnListener) Accept() (net.Conn, error)
Accept accepts the first stream on a session and wraps it as a net.Conn.
Click to show internal directories.
Click to hide internal directories.