Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSessionRegistry ¶
func NewSessionRegistry() *sessionRegistry
Types ¶
type NoopSessionHooks ¶
type NoopSessionHooks int
func (*NoopSessionHooks) OnClose ¶
func (*NoopSessionHooks) OnClose(*Session) error
type NoopTunnelHooks ¶
type NoopTunnelHooks int
func (*NoopTunnelHooks) OnConnectionClose ¶
func (*NoopTunnelHooks) OnConnectionOpen ¶
func (*NoopTunnelHooks) OnConnectionOpen(*Tunnel, conn.Conn) error
func (*NoopTunnelHooks) OnTunnelClose ¶
func (*NoopTunnelHooks) OnTunnelClose(*Tunnel) error
func (*NoopTunnelHooks) OnTunnelOpen ¶
func (*NoopTunnelHooks) OnTunnelOpen(*Tunnel) error
type Server ¶
type Server struct { log.Logger // logger for the server object Binders // a map of protocol name -> tunnel binder SessionHooks // user-defined hooks to customize session behavior TunnelHooks // user-definied hooks to customize tunnel behavior // contains filtered or unexported fields }
A Server accepts new go-tunnel connections from clients and establishes a Session on which it wil services their requests to listen for connections on the Server's ports and/or hostnames of well-known protocols.
Servers with custom behaviors maybe implemented by setting the SessionHooks and TunnelHooks properties before calling .Run()
func NewServer ¶
NewServer creates a new server which binds tunnels with binders on sessions it accepts from the given listener.
func Serve ¶
Serve creates a Server listening for new connections on the given address. It binds tunnels on those sessions with the given binders.
type Session ¶
type Session struct { // logger log.Logger // synchronization for accessing Session.tunnels sync.Mutex // contains filtered or unexported fields }
func NewSession ¶
func NewSession(mux muxado.Session, registry *sessionRegistry, sessHooks SessionHooks, tunnelHooks TunnelHooks, binders Binders) *Session
type SessionHooks ¶
Click to show internal directories.
Click to hide internal directories.