bindings

package
v0.0.0-...-db8bf72 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

quicly-bindings

Index

Constants

View Source
const (
	// QUICLY_ERROR_PACKET_IGNORED as defined in quicly/constants.h:102
	QUICLY_ERROR_PACKET_IGNORED = 0xff01
	// QUICLY_ERROR_SENDBUF_FULL as defined in quicly/constants.h:103
	QUICLY_ERROR_SENDBUF_FULL = 0xff02
	// QUICLY_ERROR_FREE_CONNECTION as defined in quicly/constants.h:104
	QUICLY_ERROR_FREE_CONNECTION = 0xff03
	// QUICLY_ERROR_RECEIVED_STATELESS_RESET as defined in quicly/constants.h:105
	QUICLY_ERROR_RECEIVED_STATELESS_RESET = 0xff04
	// QUICLY_ERROR_NO_COMPATIBLE_VERSION as defined in quicly/constants.h:106
	QUICLY_ERROR_NO_COMPATIBLE_VERSION = 0xff05
	// QUICLY_ERROR_IS_CLOSING as defined in quicly/constants.h:107
	QUICLY_ERROR_IS_CLOSING = 0xff06
	// QUICLY_ERROR_STATE_EXHAUSTION as defined in quicly/constants.h:108
	QUICLY_ERROR_STATE_EXHAUSTION = 0xff07
	// QUICLY_ERROR_INVALID_INITIAL_VERSION as defined in quicly/constants.h:109
	QUICLY_ERROR_INVALID_INITIAL_VERSION = 0xff08
	// QUICLY_ERROR_DECRYPTION_FAILED as defined in quicly/constants.h:110
	QUICLY_ERROR_DECRYPTION_FAILED = 0xff09
)
View Source
const (
	// QUICLY_OK as declared in include/quicly_wrapper.h:11
	QUICLY_OK = iota
	// QUICLY_ERROR_NOTINITILIZED as declared in include/quicly_wrapper.h:12
	QUICLY_ERROR_NOTINITILIZED = 1
	// QUICLY_ERROR_ALREADY_INIT as declared in include/quicly_wrapper.h:13
	QUICLY_ERROR_ALREADY_INIT = 2
	// QUICLY_ERROR_FAILED as declared in include/quicly_wrapper.h:14
	QUICLY_ERROR_FAILED = 3
	// QUICLY_ERROR_CERT_LOAD_FAILED as declared in include/quicly_wrapper.h:15
	QUICLY_ERROR_CERT_LOAD_FAILED = 4
	// QUICLY_ERROR_DECODE_FAILED as declared in include/quicly_wrapper.h:16
	QUICLY_ERROR_DECODE_FAILED = 5
	// QUICLY_ERROR_DESTINATION_NOT_FOUND as declared in include/quicly_wrapper.h:17
	QUICLY_ERROR_DESTINATION_NOT_FOUND = 6
	// QUICLY_ERROR_NOT_OPEN as declared in include/quicly_wrapper.h:18
	QUICLY_ERROR_NOT_OPEN = 7
	// QUICLY_ERROR_STREAM_NOT_FOUND as declared in include/quicly_wrapper.h:19
	QUICLY_ERROR_STREAM_NOT_FOUND = 8
	// QUICLY_ERROR_UNKNOWN_CC_ALGO as declared in include/quicly_wrapper.h:20
	QUICLY_ERROR_UNKNOWN_CC_ALGO = 9
)

Variables

This section is empty.

Functions

func GetConnection

func GetConnection(id uint64) (types.Session, bool)

func IovecToBytes

func IovecToBytes(data Iovec) []byte

func QuiclyClose

func QuiclyClose(Conn_id Size_t, Error int32) int32

QuiclyClose function as declared in include/quicly_wrapper.h:49

func QuiclyCloseEngine

func QuiclyCloseEngine() int32

QuiclyCloseEngine function as declared in include/quicly_wrapper.h:39

func QuiclyCloseStream

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

QuiclyCloseStream function as declared in include/quicly_wrapper.h:47

func QuiclyConnect

func QuiclyConnect(Address string, Port int32, Id *Size_t) int32

QuiclyConnect function as declared in include/quicly_wrapper.h:43

func QuiclyInitializeEngine

func QuiclyInitializeEngine(Is_client uint64, Alpn string, Certificate_file string, Key_file string, Idle_timeout_ms uint64, Cc_algo uint64) int32

QuiclyInitializeEngine function as declared in include/quicly_wrapper.h:34

func QuiclyOpenStream

func QuiclyOpenStream(Conn_id Size_t, Stream_id *Size_t) int32

QuiclyOpenStream function as declared in include/quicly_wrapper.h:45

func QuiclyOutgoingMsgQueue

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

QuiclyOutgoingMsgQueue function as declared in include/quicly_wrapper.h:51

func QuiclyProcessMsg

func QuiclyProcessMsg(Is_client int32, Address string, Port int32, Msg []byte, Dgram_len Size_t, Id *Size_t) int32

QuiclyProcessMsg function as declared in include/quicly_wrapper.h:41

func QuiclyWriteStream

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

QuiclyWriteStream function as declared in include/quicly_wrapper.h:53

func RegisterConnection

func RegisterConnection(s types.Session, id uint64)

func RemoveConnection

func RemoveConnection(id uint64)

func ResetRegistry

func ResetRegistry()

Types

type Iovec

type Iovec struct {
	Iov_base []byte
	Iov_len  Size_t
	// contains filtered or unexported fields
}

Iovec as declared in include/quicly.h:42

func NewIovecRef

func NewIovecRef(ref unsafe.Pointer) *Iovec

NewIovecRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.

func (*Iovec) Deref

func (x *Iovec) Deref()

Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.

func (*Iovec) Free

func (x *Iovec) Free()

Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.

func (*Iovec) PassRef

func (x *Iovec) PassRef() (*C.struct_iovec, *cgoAllocMap)

PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.

func (Iovec) PassValue

func (x Iovec) PassValue() (C.struct_iovec, *cgoAllocMap)

PassValue does the same as PassRef except that it will try to dereference the returned pointer.

func (*Iovec) Ref

func (x *Iovec) Ref() *C.struct_iovec

Ref returns the underlying reference to C object or nil if struct is nil.

type Size_t

type Size_t uint64

Size_t type as declared in include/crtdefs.h:35

Jump to

Keyboard shortcuts

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