netutils

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2015 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeadlineToTimeoutListener

func DeadlineToTimeoutListener(l net.Listener) net.Listener

DeadlineToTimeoutListener wraps the provided listener in a new one whose Accept methods returns a wrapped net.Conn whose Deadlines set timeouts for each Read|Write individually. Example: a conn.SetReadDeadline(time.Now().Add(time.Second)) will set a timeout of one second. With the standard conn|listener this will mean that if you start reading a response calling Read multiple times but it all takes more than a second it will timeout. With a connection from this listener if each call to Read finishes in less than a second the connection will not timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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