netadaptor

package
v0.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package netadaptor implements an adaptor from transport.AuthenticatedListener to net.Listener.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

func New

func New(authListener transport.AuthenticatedListener, l Logger) *Listener

Consume the given authListener and wrap it as a *Listener, which implements net.Listener. The returned net.Listener must be closed. The wrapped authListener is closed when the returned net.Listener is closed.

func (Listener) Accept

func (a Listener) Accept() (net.Conn, error)

The returned net.Conn is guaranteed to be *transport.AuthConn, i.e., the type of connection returned by the wrapped transport.AuthenticatedListener.

func (Listener) Addr

func (a Listener) Addr() net.Addr

func (Listener) Close

func (a Listener) Close() error

type Logger

type Logger = logger.Logger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL