selffasthttputil

package
v0.0.0-...-2268fce Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2018 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// 读/写 超时
	ErrTimeout = errors.New("timeout")
)

Functions

This section is empty.

Types

type PipeConns

type PipeConns struct {
	// contains filtered or unexported fields
}

提供双向联通管道:使用进程内的内存,作为联结 该类型,须通过NewPipeConns创建 与net.Pipe连接相比,有以下属性: * 更快 * 缓存写调用,所以无需并发协程,去调用 读接口,以便无阻塞所有 Write接口 * 支持 读/写超时

func NewPipeConns

func NewPipeConns() *PipeConns

双向联通管道

func (*PipeConns) Close

func (pc *PipeConns) Close() error

关闭双向管道

func (*PipeConns) Conn1

func (pc *PipeConns) Conn1() net.Conn

返回首端-双向通道 数据写入Conn1,有可能从Conn2读 数据写入Conn2,有可能从Conn1写

func (*PipeConns) Conn2

func (pc *PipeConns) Conn2() net.Conn

Jump to

Keyboard shortcuts

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