Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIdleTimeout = errors.New("connection closed due to idle timeout")
Functions ¶
Types ¶
type RateLimitedConn ¶ added in v1.1.5
func NewRateLimitedConn ¶ added in v1.1.5
func NewRateLimitedConn(conn net.Conn, kbps int64) *RateLimitedConn
type RelayConn ¶
type RelayConn interface { // Transport transports data between the client and the remote connection. Transport() error GetRelayLabel() string GetStats() *Stats Close() error }
RelayConn is the interface that represents a relay connection. it contains two connections: clientConn and remoteConn clientConn is the connection from the client to the relay server remoteConn is the connection from the relay server to the remote server and the main function is to transport data between the two connections
func NewRelayConn ¶
func NewRelayConn(clientConn, remoteConn net.Conn, opts ...RelayConnOption) RelayConn
type RelayConnOption ¶
type RelayConnOption func(*relayConnImpl)
func WithConnType ¶ added in v1.1.5
func WithConnType(connType string) RelayConnOption
func WithLogger ¶ added in v1.1.5
func WithLogger(l *zap.SugaredLogger) RelayConnOption
func WithRelayLabel ¶ added in v1.1.5
func WithRelayLabel(relayLabel string) RelayConnOption
func WithRelayOptions ¶ added in v1.1.5
func WithRelayOptions(opts *conf.Options) RelayConnOption
func WithRemote ¶ added in v1.1.5
func WithRemote(remote *lb.Node) RelayConnOption
type UDPListener ¶ added in v1.1.5
type UDPListener struct {
// contains filtered or unexported fields
}
func NewUDPListener ¶ added in v1.1.5
func (*UDPListener) Accept ¶ added in v1.1.5
func (l *UDPListener) Accept() (*uc, error)
func (*UDPListener) Close ¶ added in v1.1.5
func (l *UDPListener) Close() error
Click to show internal directories.
Click to hide internal directories.