net

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyConn

func CopyConn(dst, src net.Conn, timeout time.Duration, bufSize int) error

CopyConn copies data between src and dst with a timeout and buffer size.

Types

type CloseWriter

type CloseWriter interface {
	net.Conn
	CloseWrite() error
}

CloseWriter is an interface that wraps the CloseWrite method, which is used to close the write side of a connection.

type ConnDialer

type ConnDialer interface {
	DialConnContext(ctx context.Context, conn net.Conn, network, address string) (net.Conn, error)
}

ConnDialer represents a type capable of upgrading an existing connection.

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

Dialer represents a type capable of creating network connections.

var DefaultDialer Dialer = &net.Dialer{}

DefaultDialer is the default Dialer using net.Dialer.

Jump to

Keyboard shortcuts

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