net

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 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 DeadlineConnection

type DeadlineConnection struct {
	net.Conn
	ReadDeadlineTimeout  time.Duration
	WriteDeadlineTimeout time.Duration
}

DeadlineConnection is an extension over the standard net.Conn, that makes it more convenient to read/write within a configurable timeout. It is essential in network communication where the network is unreliable.

func (*DeadlineConnection) Read

func (d *DeadlineConnection) Read(b []byte) (int, error)

func (*DeadlineConnection) Write

func (d *DeadlineConnection) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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