quiclylib

package
v0.0.0-...-53cf90a Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	READ_SIZE         = 32 * 1024
	SMALL_BUFFER_SIZE = 4 * 1024

	WRITE_TIMEOUT = 500 * time.Millisecond
)
View Source
const (
	MAX_CONNECTIONS = 8192
)

Variables

This section is empty.

Functions

func IovecToBytes

func IovecToBytes(data Iovec) []byte

func QuiclyClose

func QuiclyClose(Conn_id uint64, Error int32) int32

func QuiclyCloseEngine

func QuiclyCloseEngine() int

func QuiclyCloseStream

func QuiclyCloseStream(Conn_id uint64, Stream_id uint64, Error int32) int32

func QuiclyConnect

func QuiclyConnect(Address string, Port int32, Conn_id uint64) int32

func QuiclyInitializeEngine

func QuiclyInitializeEngine(options types.Options) int

func QuiclyOpenStream

func QuiclyOpenStream(Conn_id uint64, Stream_id *uint64) int32

func QuiclyOutgoingMsgQueue

func QuiclyOutgoingMsgQueue(Id uint64, Dgram []Iovec, Num_dgrams *uint64) int32

func QuiclyProcessMsg

func QuiclyProcessMsg(Is_client int32, Address string, Port int32, Msg []byte, Dgram_len uint64, Conn_id uint64) int32

func QuiclySendDatagram

func QuiclySendDatagram(Conn_id uint64, Msg []byte, Dgram_len uint64) int32

func QuiclyWriteStream

func QuiclyWriteStream(Conn_id uint64, Stream_id uint64, Msg []byte, Dgram_len uint64) int32

Types

type Iovec

type Iovec = bindings.Iovec

type QClientSession

type QClientSession struct {
	// exported fields
	NetConn *net.UDPConn
	Ctx     context.Context
	Logger  log.Logger

	// callback
	types.Callbacks
	// contains filtered or unexported fields
}

func (*QClientSession) Accept

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

func (*QClientSession) Addr

func (s *QClientSession) Addr() net.Addr

func (*QClientSession) Close

func (s *QClientSession) Close() error

func (*QClientSession) GetStream

func (s *QClientSession) GetStream(id uint64) types.Stream

func (*QClientSession) ID

func (s *QClientSession) ID() uint64

func (*QClientSession) IsClosed

func (s *QClientSession) IsClosed() bool

func (*QClientSession) OnStreamClose

func (s *QClientSession) OnStreamClose(streamId uint64, error int)

func (*QClientSession) OnStreamOpen

func (s *QClientSession) OnStreamOpen(streamId uint64)

func (*QClientSession) OpenStream

func (s *QClientSession) OpenStream() types.Stream

func (*QClientSession) StreamPacket

func (s *QClientSession) StreamPacket(packet *types.Packet)

type QServerConnection

type QServerConnection struct {
	// exported fields
	Ctx     context.Context
	NetConn *net.UDPConn
	Logger  log.Logger
	// contains filtered or unexported fields
}

func (*QServerConnection) Accept

func (r *QServerConnection) Accept() (types.Stream, error)

func (*QServerConnection) Addr

func (r *QServerConnection) Addr() net.Addr

func (*QServerConnection) Close

func (r *QServerConnection) Close() error

func (*QServerConnection) GetStream

func (r *QServerConnection) GetStream(id uint64) types.Stream

func (*QServerConnection) ID

func (r *QServerConnection) ID() uint64

func (*QServerConnection) IsClosed

func (r *QServerConnection) IsClosed() bool

func (*QServerConnection) OnStreamClose

func (r *QServerConnection) OnStreamClose(streamId uint64, code int)

func (*QServerConnection) OnStreamOpen

func (r *QServerConnection) OnStreamOpen(streamId uint64)

func (*QServerConnection) OpenStream

func (r *QServerConnection) OpenStream() types.Stream

func (*QServerConnection) StreamPacket

func (r *QServerConnection) StreamPacket(packet *types.Packet)

type QServerSession

type QServerSession struct {
	// exported fields
	NetConn *net.UDPConn
	Ctx     context.Context
	Logger  log.Logger

	// callback
	types.Callbacks
	// contains filtered or unexported fields
}

func (*QServerSession) Accept

func (s *QServerSession) Accept() (types.ServerConnection, error)

func (*QServerSession) Addr

func (s *QServerSession) Addr() net.Addr

func (*QServerSession) Close

func (s *QServerSession) Close() error

func (*QServerSession) GetStream

func (s *QServerSession) GetStream(id uint64) types.Stream

func (*QServerSession) ID

func (s *QServerSession) ID() uint64

func (*QServerSession) IsClosed

func (s *QServerSession) IsClosed() bool

func (*QServerSession) OnStreamClose

func (s *QServerSession) OnStreamClose(streamId uint64, error int)

func (*QServerSession) OnStreamOpen

func (s *QServerSession) OnStreamOpen(streamId uint64)

func (*QServerSession) OpenStream

func (s *QServerSession) OpenStream() types.Stream

func (*QServerSession) StreamPacket

func (s *QServerSession) StreamPacket(packet *types.Packet)

type QStream

type QStream struct {
	Logger log.Logger
	// contains filtered or unexported fields
}

func (*QStream) Close

func (s *QStream) Close() error

func (*QStream) ID

func (s *QStream) ID() uint64

func (*QStream) IsClosed

func (s *QStream) IsClosed() bool

func (*QStream) LocalAddr

func (s *QStream) LocalAddr() net.Addr

func (*QStream) OnAckedSentBytes

func (s *QStream) OnAckedSentBytes(size uint64)

func (*QStream) OnClosed

func (s *QStream) OnClosed() error

func (*QStream) OnOpened

func (s *QStream) OnOpened()

func (*QStream) OnReceived

func (s *QStream) OnReceived(data []byte, dataLen int)

func (*QStream) OnSentBytes

func (s *QStream) OnSentBytes(size uint64)

func (*QStream) Read

func (s *QStream) Read(buffRd []byte) (n int, err error)

func (*QStream) RemoteAddr

func (s *QStream) RemoteAddr() net.Addr

func (*QStream) SetDeadline

func (s *QStream) SetDeadline(t time.Time) error

func (*QStream) SetReadDeadline

func (s *QStream) SetReadDeadline(t time.Time) error

func (*QStream) SetWriteDeadline

func (s *QStream) SetWriteDeadline(t time.Time) error

func (*QStream) Sync

func (s *QStream) Sync() bool

func (*QStream) Write

func (s *QStream) Write(buffWr []byte) (n int, err error)

type Size_t

type Size_t = bindings.Size_t

Directories

Path Synopsis
quicly-errors
quicly-errors

Jump to

Keyboard shortcuts

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