bindings

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 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:104
	QUICLY_ERROR_PACKET_IGNORED = 0xff01
	// QUICLY_ERROR_SENDBUF_FULL as defined in quicly/constants.h:105
	QUICLY_ERROR_SENDBUF_FULL = 0xff02
	// QUICLY_ERROR_FREE_CONNECTION as defined in quicly/constants.h:106
	QUICLY_ERROR_FREE_CONNECTION = 0xff03
	// QUICLY_ERROR_RECEIVED_STATELESS_RESET as defined in quicly/constants.h:107
	QUICLY_ERROR_RECEIVED_STATELESS_RESET = 0xff04
	// QUICLY_ERROR_NO_COMPATIBLE_VERSION as defined in quicly/constants.h:108
	QUICLY_ERROR_NO_COMPATIBLE_VERSION = 0xff05
	// QUICLY_ERROR_IS_CLOSING as defined in quicly/constants.h:109
	QUICLY_ERROR_IS_CLOSING = 0xff06
	// QUICLY_ERROR_STATE_EXHAUSTION as defined in quicly/constants.h:110
	QUICLY_ERROR_STATE_EXHAUSTION = 0xff07
	// QUICLY_ERROR_INVALID_INITIAL_VERSION as defined in quicly/constants.h:111
	QUICLY_ERROR_INVALID_INITIAL_VERSION = 0xff08
	// QUICLY_ERROR_DECRYPTION_FAILED as defined in quicly/constants.h:112
	QUICLY_ERROR_DECRYPTION_FAILED = 0xff09
)
View Source
const (
	// QUICLY_OK as declared in internal/quicly_wrapper.h:16
	QUICLY_OK = iota
	// QUICLY_ERROR_NOTINITILIZED as declared in internal/quicly_wrapper.h:17
	QUICLY_ERROR_NOTINITILIZED = 1
	// QUICLY_ERROR_ALREADY_INIT as declared in internal/quicly_wrapper.h:18
	QUICLY_ERROR_ALREADY_INIT = 2
	// QUICLY_ERROR_FAILED as declared in internal/quicly_wrapper.h:19
	QUICLY_ERROR_FAILED = 3
	// QUICLY_ERROR_CERT_LOAD_FAILED as declared in internal/quicly_wrapper.h:20
	QUICLY_ERROR_CERT_LOAD_FAILED = 4
	// QUICLY_ERROR_DECODE_FAILED as declared in internal/quicly_wrapper.h:21
	QUICLY_ERROR_DECODE_FAILED = 5
	// QUICLY_ERROR_DESTINATION_NOT_FOUND as declared in internal/quicly_wrapper.h:22
	QUICLY_ERROR_DESTINATION_NOT_FOUND = 6
	// QUICLY_ERROR_NOT_OPEN as declared in internal/quicly_wrapper.h:23
	QUICLY_ERROR_NOT_OPEN = 7
	// QUICLY_ERROR_STREAM_NOT_FOUND as declared in internal/quicly_wrapper.h:24
	QUICLY_ERROR_STREAM_NOT_FOUND = 8
	// QUICLY_ERROR_UNKNOWN_CC_ALGO as declared in internal/quicly_wrapper.h:25
	QUICLY_ERROR_UNKNOWN_CC_ALGO = 9
	// QUICLY_ERROR_CANNOT_SEND as declared in internal/quicly_wrapper.h:26
	QUICLY_ERROR_CANNOT_SEND = 10
	// QUICLY_ERROR_STREAM_BUSY as declared in internal/quicly_wrapper.h:27
	QUICLY_ERROR_STREAM_BUSY = 11
)

Variables

This section is empty.

Functions

func QuiclyClose

func QuiclyClose(Conn_id Size_t, Error int32) int32

QuiclyClose function as declared in internal/quicly_wrapper.h:62

func QuiclyCloseEngine

func QuiclyCloseEngine() int32

QuiclyCloseEngine function as declared in internal/quicly_wrapper.h:52

func QuiclyCloseStream

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

QuiclyCloseStream function as declared in internal/quicly_wrapper.h:60

func QuiclyConnect

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

QuiclyConnect function as declared in internal/quicly_wrapper.h:56

func QuiclyInitializeEngine

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

QuiclyInitializeEngine function as declared in internal/quicly_wrapper.h:47

func QuiclyOpenStream

func QuiclyOpenStream(Conn_id Size_t, Stream_id *Size_t) int32

QuiclyOpenStream function as declared in internal/quicly_wrapper.h:58

func QuiclyOutgoingMsgQueue

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

QuiclyOutgoingMsgQueue function as declared in internal/quicly_wrapper.h:64

func QuiclyProcessMsg

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

QuiclyProcessMsg function as declared in internal/quicly_wrapper.h:54

func QuiclySendDatagram

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

QuiclySendDatagram function as declared in internal/quicly_wrapper.h:68

func QuiclyWriteStream

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

QuiclyWriteStream function as declared in internal/quicly_wrapper.h:66

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/corecrt.h:40

Jump to

Keyboard shortcuts

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