stream_multiplexer

package
v0.0.0-...-465a192 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MULTIPLEXER_HEADER_SIZE = 8

MULTIPLEXER_HEADER_SIZE is the size of the header for the multiplexed data, currently 4 byte for StreamID and 4 byte for length

Variables

This section is empty.

Functions

func StartEgressHandler

func StartEgressHandler(serverAddress string, maxMessageSize int, upstreamChan chan []byte, downstreamChan chan []byte, stopChan chan bool, verbose bool)

StartEgressHandler creates (and block) an Egress Server

func StartIngressServer

func StartIngressServer(port int, maxMessageSize int, upstreamChan chan []byte, downstreamChan chan []byte, stopChan chan bool, verbose bool)

StartIngressServer creates (and block) an Ingress Server

Types

type EgressServer

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

EgressServer takes data from a go channel and recreates the multiplexed TCP streams

type IngressServer

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

IngressServer accepts TCPs connections and multiplexes them (read- and write-) over go channels

type MultiplexedConnection

type MultiplexedConnection struct {
	ID       string
	ID_bytes []byte
	// contains filtered or unexported fields
}

MultiplexedConnection represents a TCP connections to which we assigned a stream ID

Jump to

Keyboard shortcuts

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