timeoutnet

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeoutReader

type TimeoutReader struct {
	net.Conn
	Timeout time.Duration
	Ctx     context.Context
}

TimeoutReader wraps a net.Conn and sets a read timeout

func (*TimeoutReader) Read

func (r *TimeoutReader) Read(p []byte) (int, error)

func (*TimeoutReader) WriteTo

func (r *TimeoutReader) WriteTo(w io.Writer) (int64, error)

type TimeoutWriter

type TimeoutWriter struct {
	Conn    net.Conn
	Timeout time.Duration
	Ctx     context.Context
}

func (*TimeoutWriter) Write

func (w *TimeoutWriter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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