Documentation ¶
Index ¶
- Constants
- func IovecToBytes(data Iovec) []byte
- func QuiclyClose(Conn_id uint64, Error int32) int32
- func QuiclyCloseEngine() int
- func QuiclyCloseStream(Conn_id uint64, Stream_id uint64, Error int32) int32
- func QuiclyConnect(Address string, Port int32, Conn_id uint64) int32
- func QuiclyInitializeEngine(options types.Options) int
- func QuiclyOpenStream(Conn_id uint64, Stream_id *uint64) int32
- func QuiclyOutgoingMsgQueue(Id uint64, Dgram []Iovec, Num_dgrams *uint64) int32
- func QuiclyProcessMsg(Is_client int32, Address string, Port int32, Msg []byte, Dgram_len uint64, ...) int32
- func QuiclySendDatagram(Conn_id uint64, Msg []byte, Dgram_len uint64) int32
- func QuiclyWriteStream(Conn_id uint64, Stream_id uint64, Msg []byte, Dgram_len uint64) int32
- type Iovec
- type QClientSession
- func (s *QClientSession) Accept() (net.Conn, error)
- func (s *QClientSession) Addr() net.Addr
- func (s *QClientSession) Close() error
- func (s *QClientSession) GetStream(id uint64) types.Stream
- func (s *QClientSession) ID() uint64
- func (s *QClientSession) IsClosed() bool
- func (s *QClientSession) OnStreamClose(streamId uint64, error int)
- func (s *QClientSession) OnStreamOpen(streamId uint64)
- func (s *QClientSession) OpenStream() types.Stream
- func (s *QClientSession) StreamPacket(packet *types.Packet)
- type QServerConnection
- func (r *QServerConnection) Accept() (types.Stream, error)
- func (r *QServerConnection) Addr() net.Addr
- func (r *QServerConnection) Close() error
- func (r *QServerConnection) GetStream(id uint64) types.Stream
- func (r *QServerConnection) ID() uint64
- func (r *QServerConnection) IsClosed() bool
- func (r *QServerConnection) OnStreamClose(streamId uint64, code int)
- func (r *QServerConnection) OnStreamOpen(streamId uint64)
- func (r *QServerConnection) OpenStream() types.Stream
- func (r *QServerConnection) StreamPacket(packet *types.Packet)
- type QServerSession
- func (s *QServerSession) Accept() (types.ServerConnection, error)
- func (s *QServerSession) Addr() net.Addr
- func (s *QServerSession) Close() error
- func (s *QServerSession) GetStream(id uint64) types.Stream
- func (s *QServerSession) ID() uint64
- func (s *QServerSession) IsClosed() bool
- func (s *QServerSession) OnStreamClose(streamId uint64, error int)
- func (s *QServerSession) OnStreamOpen(streamId uint64)
- func (s *QServerSession) OpenStream() types.Stream
- func (s *QServerSession) StreamPacket(packet *types.Packet)
- type QStream
- func (s *QStream) Close() error
- func (s *QStream) ID() uint64
- func (s *QStream) IsClosed() bool
- func (s *QStream) LocalAddr() net.Addr
- func (s *QStream) OnAckedSentBytes(size uint64)
- func (s *QStream) OnClosed() error
- func (s *QStream) OnOpened()
- func (s *QStream) OnReceived(data []byte, dataLen int)
- func (s *QStream) OnSentBytes(size uint64)
- func (s *QStream) Read(buffRd []byte) (n int, err error)
- func (s *QStream) RemoteAddr() net.Addr
- func (s *QStream) SetDeadline(t time.Time) error
- func (s *QStream) SetReadDeadline(t time.Time) error
- func (s *QStream) SetWriteDeadline(t time.Time) error
- func (s *QStream) Sync() bool
- func (s *QStream) Write(buffWr []byte) (n int, err error)
- type Size_t
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 QuiclyClose ¶
func QuiclyCloseEngine ¶
func QuiclyCloseEngine() int
func QuiclyCloseStream ¶
func QuiclyInitializeEngine ¶
func QuiclyOpenStream ¶
func QuiclyOutgoingMsgQueue ¶
func QuiclyProcessMsg ¶
func QuiclySendDatagram ¶
Types ¶
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) Addr ¶
func (s *QClientSession) Addr() net.Addr
func (*QClientSession) Close ¶
func (s *QClientSession) Close() error
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) Addr ¶
func (r *QServerConnection) Addr() net.Addr
func (*QServerConnection) Close ¶
func (r *QServerConnection) Close() error
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) 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 ¶
func (*QStream) OnAckedSentBytes ¶
func (*QStream) OnReceived ¶
func (*QStream) OnSentBytes ¶
func (*QStream) RemoteAddr ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.