adapter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationError

type ApplicationError int64

type QuicAPI

type QuicAPI interface {
	// TODO: there might be a use for contexts here
	OnNewConnection(conn QuicConn)
	OnCanceledConn(conn QuicConn)
	OnNewBiStream(conn QuicConn, stream QuicBiStream)
	OnReadBiStream(conn QuicConn, stream QuicBiStream, data io.Reader)
	OnNewUniStream(conn QuicConn, id StreamId)
	OnReadUniStream(conn QuicConn, id StreamId, data io.Reader)
}

type QuicBiStream

type QuicBiStream interface {
	QuicUniStream
	WriteFin()
	Close(reason ApplicationError)
	CloseRead(reason ApplicationError)
	CloseWrite(reason ApplicationError)
}

Streams can send data

type QuicConfig

type QuicConfig struct {
	MaxBiStreams     uint64
	MaxUniStreams    uint64
	IdleTimeout      time.Duration
	HandshakeTimeout time.Duration
}

TODO: add this to the adapter constructors

type QuicConn

type QuicConn interface {
	fmt.Stringer
	LocalAddress() string
	RemoteAddress() string
	Close(reason ApplicationError)
	CreateUniStream(streamType StreamType) (QuicUniStream, error)
}

type QuicServer

type QuicServer interface {
	Listen() error
}

type QuicUniStream

type QuicUniStream interface {
	io.Writer
	ID() StreamId
}

type StreamId

type StreamId int64

type StreamType

type StreamType int8

Directories

Path Synopsis
cmd command
cmd command

Jump to

Keyboard shortcuts

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