pmux

package
v0.26.10 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

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 (
	HTTP_GET        = 716984
	HTTP_POST       = 807983
	HTTP_HEAD       = 726965
	HTTP_PUT        = 808585
	HTTP_DELETE     = 686976
	HTTP_CONNECT    = 677978
	HTTP_OPTIONS    = 798084
	HTTP_TRACE      = 848265
	CLIENT          = 848384
	ACCEPT_TIME_OUT = 10
)

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 {
	net.Listener
	// contains filtered or unexported fields
}

func NewPortListener

func NewPortListener(connCh chan *PortConn, addr net.Addr) *PortListener

func (*PortListener) Accept

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

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 string) *PortMux

func (*PortMux) Close

func (pMux *PortMux) Close() error

func (*PortMux) GetClientListener

func (pMux *PortMux) GetClientListener() 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