quic

package
v0.3.1-rc.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxDatagramFrameSize int64 = 1200 - 3

https://github.com/quic-go/quic-go/blob/49e588a6a9905446e49d382d78115e6e960b1144/internal/protocol/params.go#L134

Functions

func New

Types

type Client

type Client struct {
	netapi.EmptyDispatch
	// contains filtered or unexported fields
}

func (*Client) Conn

func (c *Client) Conn(ctx context.Context, s netapi.Address) (net.Conn, error)

func (*Client) PacketConn

func (c *Client) PacketConn(ctx context.Context, host netapi.Address) (net.PacketConn, error)

type ConnectionPacketConn

type ConnectionPacketConn struct {
	// contains filtered or unexported fields
}

func NewConnectionPacketConn

func NewConnectionPacketConn(ctx context.Context, conn quic.Connection) *ConnectionPacketConn

func (*ConnectionPacketConn) Receive

func (c *ConnectionPacketConn) Receive() (uint16, []byte, net.Addr, error)

func (*ConnectionPacketConn) Write

func (c *ConnectionPacketConn) Write(b []byte, id uint16, addr net.Addr) error

type Frag

type Frag struct {
	SplitID atomic.Uint64
	// contains filtered or unexported fields
}

func (*Frag) Merge

func (f *Frag) Merge(buf []byte) []byte

func (*Frag) Split

func (f *Frag) Split(buf []byte, maxSize int) [][]byte

type FragData

type FragData struct {
	PacketID uint64
	Total    uint16
	Current  uint16
}

type MergeFrag

type MergeFrag struct {
	Count uint16
	Data  [][]byte
}

type QuicAddr

type QuicAddr struct {
	Addr net.Addr
	ID   quic.StreamID
}

func (*QuicAddr) Network

func (q *QuicAddr) Network() string

func (*QuicAddr) String

func (q *QuicAddr) String() string

type Server

type Server struct {
	*quic.Listener
	// contains filtered or unexported fields
}

func NewServer

func NewServer(packetConn net.PacketConn, tlsConfig *tls.Config, handler netapi.Handler) (*Server, error)

func (*Server) Accept

func (s *Server) Accept() (net.Conn, error)

func (*Server) Close

func (s *Server) Close() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL