Documentation
¶
Overview ¶
Package service defines the Service interface — the top-level abstraction that combines a Listener and a Handler to form a running proxy service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
// Serve starts the service and blocks until it is stopped or encounters
// a fatal error.
Serve() error
// Addr returns the service's network address.
Addr() net.Addr
// Close stops the service and releases all resources.
Close() error
}
Service is the top-level component in TNET. It wraps one Listener and one Handler: the Listener accepts inbound connections, and the Handler processes them by authenticating, routing, and forwarding traffic through a proxy chain. A running TNET instance is essentially a collection of Services.