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
- type PortConn
- func (pConn *PortConn) Close() error
- func (pConn *PortConn) LocalAddr() net.Addr
- func (pConn *PortConn) Read(b []byte) (n int, err error)
- func (pConn *PortConn) RemoteAddr() net.Addr
- func (pConn *PortConn) SetDeadline(t time.Time) error
- func (pConn *PortConn) SetReadDeadline(t time.Time) error
- func (pConn *PortConn) SetWriteDeadline(t time.Time) error
- func (pConn *PortConn) Write(b []byte) (n int, err error)
- type PortListener
- type PortMux
- func (pMux *PortMux) Close() error
- func (pMux *PortMux) GetClientListener() net.Listener
- func (pMux *PortMux) GetClientTlsListener() net.Listener
- func (pMux *PortMux) GetClientWsListener() net.Listener
- func (pMux *PortMux) GetClientWssListener() net.Listener
- func (pMux *PortMux) GetHttpListener() net.Listener
- func (pMux *PortMux) GetHttpsListener() net.Listener
- func (pMux *PortMux) GetManagerListener() net.Listener
- func (pMux *PortMux) Start() error
Constants ¶
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 ¶
func (*PortConn) RemoteAddr ¶
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