quic

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package quic implements transport.Transport using quic-go.

Index

Constants

This section is empty.

Variables

View Source
var ErrTransportClosed = errors.New("transport is closed")

Functions

This section is empty.

Types

type ErrClientNotFound

type ErrClientNotFound struct {
	ClientId string
}

func (ErrClientNotFound) Error

func (e ErrClientNotFound) Error() string

type QuicTransport

type QuicTransport struct {
	// contains filtered or unexported fields
}

Implements transport.Transport

func NewQuicTransport

func NewQuicTransport(address string, tlsConf *tls.Config, config *quic.Config) *QuicTransport

func (*QuicTransport) Broadcast

func (t *QuicTransport) Broadcast(clientIds []string, message []byte, reliable bool) error

func (*QuicTransport) Close

func (t *QuicTransport) Close() error

func (*QuicTransport) CloseClient

func (t *QuicTransport) CloseClient(id string, code int, reason string) error

func (*QuicTransport) Connections

func (t *QuicTransport) Connections() <-chan transport.Connection

func (*QuicTransport) Disconnections

func (t *QuicTransport) Disconnections() <-chan string

func (*QuicTransport) Errors

func (t *QuicTransport) Errors() <-chan error

func (*QuicTransport) GetClients

func (t *QuicTransport) GetClients() []string

func (*QuicTransport) Messages

func (t *QuicTransport) Messages() <-chan transport.Message

func (*QuicTransport) Send

func (t *QuicTransport) Send(clientId string, message []byte, reliable bool) error

func (*QuicTransport) SetIdGenerator

func (t *QuicTransport) SetIdGenerator(idGenerator func() string)

func (*QuicTransport) SetValidator

func (t *QuicTransport) SetValidator(validator func(string) (bool, string))

func (*QuicTransport) Start

func (t *QuicTransport) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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