pmux

package
v0.34.9 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: GPL-3.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pmux This module is used for port reuse Distinguish client, web manager , HTTP and HTTPS according to the difference of protocol

Index

Constants

View Source
const (
	HTTPGet     = 716984
	HTTPPost    = 807983
	HTTPHead    = 726965
	HTTPPut     = 808585
	HTTPDelete  = 686976
	HTTPConnect = 677978
	HTTPOptions = 798084
	HTTPTrace   = 848265
	CLIENT      = 848384
	// AcceptTimeout bounds both protocol recognition of a new connection and
	// the wait for the target listener to accept it.
	AcceptTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PortConn

type PortConn struct {
	Conn net.Conn
	// contains filtered or unexported fields
}

func (*PortConn) Close

func (pConn *PortConn) Close() error

func (*PortConn) LocalAddr

func (pConn *PortConn) LocalAddr() net.Addr

func (*PortConn) Read

func (pConn *PortConn) Read(b []byte) (n int, err error)

func (*PortConn) RemoteAddr

func (pConn *PortConn) RemoteAddr() net.Addr

func (*PortConn) SetDeadline

func (pConn *PortConn) SetDeadline(t time.Time) error

func (*PortConn) SetReadDeadline

func (pConn *PortConn) SetReadDeadline(t time.Time) error

func (*PortConn) SetWriteDeadline

func (pConn *PortConn) SetWriteDeadline(t time.Time) error

func (*PortConn) Write

func (pConn *PortConn) Write(b []byte) (n int, err error)

type PortListener

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

PortListener receives the connections a PortMux routes to one protocol.

func (*PortListener) Accept

func (pListener *PortListener) Accept() (net.Conn, error)

Accept returns net.ErrClosed once the listener or its PortMux is closed.

func (*PortListener) Addr

func (pListener *PortListener) Addr() net.Addr

func (*PortListener) Close

func (pListener *PortListener) Close() error

type PortMux

type PortMux struct {
	net.Listener
	// contains filtered or unexported fields
}

func NewPortMux

func NewPortMux(port int, managerHost, clientHost string) (*PortMux, error)

func (*PortMux) Close

func (pMux *PortMux) Close() error

Close stops the underlying listener and wakes up all port listeners.

func (*PortMux) GetClientListener

func (pMux *PortMux) GetClientListener() net.Listener

func (*PortMux) GetClientTlsListener added in v0.26.48

func (pMux *PortMux) GetClientTlsListener() net.Listener

func (*PortMux) GetClientWsListener added in v0.27.0

func (pMux *PortMux) GetClientWsListener() net.Listener

func (*PortMux) GetClientWssListener added in v0.27.0

func (pMux *PortMux) GetClientWssListener() net.Listener

func (*PortMux) GetHttpListener

func (pMux *PortMux) GetHttpListener() net.Listener

func (*PortMux) GetHttpsListener

func (pMux *PortMux) GetHttpsListener() net.Listener

func (*PortMux) GetManagerListener

func (pMux *PortMux) GetManagerListener() net.Listener

func (*PortMux) Start

func (pMux *PortMux) Start() error

Jump to

Keyboard shortcuts

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