tcp

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustListen

func MustListen(opts ...MustListenOption) net.Listener

MustListen returns a net.Listener.

If the listener cannot be created, it panics.

Types

type MustListenOption

type MustListenOption func(*MustListenOptions)

func WithAddr

func WithAddr(addr string) MustListenOption

WithAddr sets the address to listen on.

func WithPort

func WithPort(port string) MustListenOption

WithPort sets the port to listen on.

type MustListenOptions

type MustListenOptions struct {
	Addr *string
	Port *string
}

Jump to

Keyboard shortcuts

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