transportmux

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package transportmux wraps a transport.{Connecter,AuthenticatedListener} to distinguish different connection types based on a label sent from client to server on connection establishment.

Labels are plain text and fixed length.

Index

Constants

View Source
const LabelLen = 64

Exact length of a label in bytes (0-byte padded if it is shorter). This is a protocol constant, changing it breaks the wire protocol.

Variables

View Source
var ErrClosed = &net.OpError{
	Op:     "accept",
	Net:    "demux",
	Source: nil,
	Addr:   nil,
	Err:    syscall.EINVAL,
}

Functions

func Demux

func MuxConnecter

func MuxConnecter(rawConnecter transport.Connecter, labels []string, timeout time.Duration) (map[string]transport.Connecter, error)

Types

type Logger

type Logger = logger.Logger

Jump to

Keyboard shortcuts

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