tcp

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

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
}

Listener is a wrapper of a TCP listener.

func NewListener

func NewListener(name string) Listener

NewListener returns a new listener.

func (*Listener) Close

func (l *Listener) Close() error

Close the listener.

func (*Listener) GetAddress

func (l *Listener) GetAddress() string

GetAddress returns the listening address.

func (*Listener) GetListener

func (l *Listener) GetListener() net.Listener

GetListener returns the wrapped listener.

func (*Listener) Listen

func (l *Listener) Listen(address string) error

Listen starts the listener.

func (*Listener) Name

func (l *Listener) Name() string

Name returns the name of listener.

Jump to

Keyboard shortcuts

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