Documentation
¶
Index ¶
- func Listen(network, address string, onClose func()) (net.Listener, error)
- type Client
- type Handler
- func (h *Handler) Close()
- func (h *Handler) CreateClient(req *api.CreateClientRequest, svr api.ControlService_CreateClientServer) error
- func (h *Handler) ListBackendServiceUsers(ctx context.Context, req *api.ListBackendServiceUsersRequest) (*api.ListBackendServiceUsersResponse, error)
- func (h *Handler) ListClients(ctx context.Context, req *api.ListClientsRequest) (*api.ListClientsResponse, error)
- func (h *Handler) ListInternalService(ctx context.Context, req *api.ListInternalServiceRequest) (*api.ListInternalServiceResponse, error)
- func (h *Handler) StartInternalService(ctx context.Context, req *api.StartInternalServiceRequest) (*api.InternalService, error)
- type InternalService
- type PairedConn
- type SharedListener
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { NewPubConnNotifyCH chan Token // contains filtered or unexported fields }
func (*Client) IntBindAddr ¶
func (*Client) PubBindAddr ¶
func (*Client) SetSTUNInfo ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) CreateClient ¶
func (h *Handler) CreateClient(req *api.CreateClientRequest, svr api.ControlService_CreateClientServer) error
CreateClient creates a new internal listener for clients. Whether public listener is unique depends on request parameter.
func (*Handler) ListBackendServiceUsers ¶
func (h *Handler) ListBackendServiceUsers(ctx context.Context, req *api.ListBackendServiceUsersRequest) (*api.ListBackendServiceUsersResponse, error)
func (*Handler) ListClients ¶
func (h *Handler) ListClients(ctx context.Context, req *api.ListClientsRequest) (*api.ListClientsResponse, error)
func (*Handler) ListInternalService ¶
func (h *Handler) ListInternalService(ctx context.Context, req *api.ListInternalServiceRequest) (*api.ListInternalServiceResponse, error)
func (*Handler) StartInternalService ¶
func (h *Handler) StartInternalService(ctx context.Context, req *api.StartInternalServiceRequest) (*api.InternalService, error)
type InternalService ¶
type PairedConn ¶
type PairedConn struct {
SRC, DEST net.Conn
SpeedIn float64
SpeedOut float64
OnClose func()
// contains filtered or unexported fields
}
func NewPairedConn ¶
func NewPairedConn(src, dst net.Conn) *PairedConn
func (*PairedConn) Close ¶
func (pc *PairedConn) Close()
func (*PairedConn) Copy ¶
func (pc *PairedConn) Copy()
func (*PairedConn) String ¶
func (pc *PairedConn) String() string
type SharedListener ¶
type SharedListener struct {
// contains filtered or unexported fields
}
SharedListener uses reference count to ensure listening on the same address will success. SO_REUSEPORT ?
func (*SharedListener) Addr ¶
func (sl *SharedListener) Addr() net.Addr
func (*SharedListener) Close ¶
func (sl *SharedListener) Close() error
Click to show internal directories.
Click to hide internal directories.