net

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNetwork

func GetNetwork(listen string) string

func MultiTLSConfig

func MultiTLSConfig(cfgs []config.Config) (*tls.Config, error)

MultiTLSConfig generates multiple TLS config from fasthttpd configrations.

Types

type TcpKeepaliveListener

type TcpKeepaliveListener struct {
	*net.TCPListener
	Keepalive       bool
	KeepalivePeriod time.Duration
}

NOTE: Copy from fasthttp/server.go

TcpKeepaliveListener sets TCP keep-alive timeouts on accepted connections. It's used by ListenAndServe, ListenAndServeTLS and ListenAndServeTLSEmbed so dead TCP connections (e.g. closing laptop mid-download) eventually go away.

func (*TcpKeepaliveListener) Accept

func (ln *TcpKeepaliveListener) Accept() (net.Conn, error)

Jump to

Keyboard shortcuts

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