connection

package
v0.0.0-...-c45527a Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(opts Options) (connection.Connection, error)

NewConnection returns new QUIC connection.

Types

type Connection

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

Connection which does QUIC tunneling.

func (*Connection) GetConfig

func (c *Connection) GetConfig() (connection.ConsumerConfig, error)

GetConfig returns the consumer configuration for session creation

func (*Connection) Reconnect

func (c *Connection) Reconnect(ctx context.Context, options connection.ConnectOptions) error

Reconnect restarts a connection with a new options.

func (*Connection) Start

func (c *Connection) Start(ctx context.Context, options connection.ConnectOptions) error

Start establish QUIC connection to the service provider.

func (*Connection) State

func (c *Connection) State() <-chan connectionstate.State

State returns connection state channel.

func (*Connection) Statistics

func (c *Connection) Statistics() (connectionstate.Statistics, error)

Statistics returns connection statistics channel.

func (*Connection) Stop

func (c *Connection) Stop()

Stop stops QUIC connection and closes connection endpoint.

type Options

type Options struct{}

Options represents connection options.

type Server

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

Server represents QUIC server.

func NewServer

func NewServer(transportConn qc.Connection, addrServe, basicUser, basicPassword string) *Server

NewServer creates new QUIC server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves HTTP requests.

func (*Server) Stats

func (s *Server) Stats() (uint64, uint64)

Stats returns server statistics.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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