pipe

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type P2PMessage

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

type Pipe

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

func CreatePipe

func CreatePipe(stream network.Stream, handler func(data []byte, pipe *Pipe) ([]byte, error), direct string) (*Pipe, error)

* handler是读到数据时的处理器

func (*Pipe) Close

func (pipe *Pipe) Close() error

func (*Pipe) GetStream

func (pipe *Pipe) GetStream() network.Stream

func (*Pipe) Read

func (pipe *Pipe) Read() []byte

内部实现

func (*Pipe) Reset

func (pipe *Pipe) Reset() error

func (*Pipe) Write

func (pipe *Pipe) Write(data []byte, sync bool) (*Pipe, <-chan []byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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