quic

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 23 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 the minium depend on DataLenPresent, the minium need minus 3 see: https://github.com/quic-go/quic-go/blob/1e874896cd39adc02663be4d77ade701b333df5a/internal/wire/datagram_frame.go#L62

Functions

func NewClient added in v0.3.3

func NewClient(config *protocol.Protocol_Quic) point.WrapProxy

func NewFragFrame added in v0.3.3

func NewFragFrame(t FragType, id uint64, total, current uint8, payload []byte) fragFrame

func NewFragFrameBytesBuffer added in v0.3.3

func NewFragFrameBytesBuffer(t FragType, id uint64, total, current uint8, payload []byte) *pool.Bytes

func NewServer

func NewServer(c *listener.Inbound_Quic) (netapi.Listener, error)

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(conn quic.Connection) *ConnectionPacketConn

func (*ConnectionPacketConn) Context added in v0.3.3

func (c *ConnectionPacketConn) Context() context.Context

func (*ConnectionPacketConn) Receive

func (c *ConnectionPacketConn) Receive(ctx context.Context) (uint64, *pool.Bytes, error)

func (*ConnectionPacketConn) Write

func (c *ConnectionPacketConn) Write(b []byte, id uint64) error

type Frag

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

func (*Frag) Merge

func (f *Frag) Merge(buf []byte) *pool.Bytes

func (*Frag) Split

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

type FragType added in v0.3.3

type FragType uint8
const (
	FragmentTypeSplit FragType = iota + 1
	FragmentTypeSingle
)

type MergeFrag

type MergeFrag struct {
	Count    uint32
	Total    uint32
	TotalLen uint32
	Data     [][]byte
	// contains filtered or unexported fields
}

type QuicAddr

type QuicAddr struct {
	Addr net.Addr
	ID   quic.StreamID
	// contains filtered or unexported fields
}

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 (*Server) Accept

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

func (*Server) Close

func (s *Server) Close() error

func (*Server) Packet added in v0.3.3

func (s *Server) Packet(context.Context) (net.PacketConn, error)

func (*Server) Stream added in v0.3.3

func (s *Server) Stream(ctx context.Context) (net.Listener, error)

Jump to

Keyboard shortcuts

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