echo

package
v0.0.0-...-8ac4b46 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugEcho = false

Functions

func EchoPortHandler

func EchoPortHandler(ug *ugate.UGate, ph *meshauth.PortListener) error

Types

type EchoHandler

type EchoHandler struct {
	UGate *ugate.UGate

	Debug       bool
	ServerFirst bool
	WaitFirst   time.Duration

	Received int
}

Control handler, also used for testing

func (*EchoHandler) Handle

func (eh *EchoHandler) Handle(ac nio.Stream) error

func (*EchoHandler) HandleConn

func (eh *EchoHandler) HandleConn(conn net.Conn) error

func (*EchoHandler) ServeHTTP

func (eh *EchoHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*EchoHandler) String

func (eh *EchoHandler) String() string

type StreamInfo

type StreamInfo struct {
	LocalAddr  net.Addr
	RemoteAddr net.Addr

	Meta http.Header

	RemoteID string

	ALPN string

	Dest string

	Type string
}

StreamInfo tracks information about one stream.

func GetStreamInfo

func GetStreamInfo(str net.Conn) *StreamInfo

Jump to

Keyboard shortcuts

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