transport

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: 1 Imported by: 0

Documentation

Overview

Package transport serves as an abstraction for bidirectional transports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	ClientId   string
	RemoteAddr string
}

type Message

type Message struct {
	ClientId string
	Data     []byte
}

type Transport

type Transport interface {
	Start(ctx context.Context) error
	Close() error
	Send(clientId string, data []byte, reliable bool) error
	Broadcast(clientId []string, data []byte, reliable bool) error
	CloseClient(clientId string, code int, reason string) error
	GetClients() (clientIds []string)
	Messages() <-chan Message
	Connections() <-chan Connection
	Disconnections() <-chan string
	Errors() <-chan error
}

Directories

Path Synopsis
Package quic implements transport.Transport using quic-go.
Package quic implements transport.Transport using quic-go.
Package webtransport implements transport.Transport using WebTransport protocol.
Package webtransport implements transport.Transport using WebTransport protocol.

Jump to

Keyboard shortcuts

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