closewrite

package
v0.11.8 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package closewrite implements a simple framing protocol on top of connections to facilitate write closure (i.e. a CloseWrite method) for connection implementations that don't provide it natively.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enable

func Enable(connection net.Conn) net.Conn

Enable enables CloseWrite for connections that doesn't support it natively. It will also work for connections that do support CloseWrite natively, but this implementation comes at the cost of some throughput, some additional memory usage, and the inability to use deadlines, so it should only be used when absolutely necessary. Most importantly, because this wrapping implements a light framing protocol on top of the connection, it must be used on both ends of the connection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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