stream

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidFrameSize added in v0.1.0

func IsValidFrameSize(frameSize int) bool

Types

type Ack added in v0.1.0

type Ack struct {
	Version uint8
	FileID  uint32
	FrameID uint32
}

func NewAck added in v0.1.0

func NewAck(fileID uint32, frameID uint32) *Ack

type Frame

type Frame struct {
	Version uint8
	FileID  uint32
	FrameID uint32
	Buf     []byte // if len(Buf) == 0 , is last frame
}

func NewFrame

func NewFrame(fileID uint32, frameID uint32, buf []byte) *Frame

type FrameStream

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

func NewFrameStream

func NewFrameStream(conn net.Conn) *FrameStream

func (*FrameStream) Close

func (fs *FrameStream) Close() error

func (*FrameStream) ReadAck added in v0.1.0

func (fs *FrameStream) ReadAck() (*Ack, error)

func (*FrameStream) ReadFrame

func (fs *FrameStream) ReadFrame() (*Frame, error)

func (*FrameStream) WriteAck added in v0.1.0

func (fs *FrameStream) WriteAck(ack *Ack) error

func (*FrameStream) WriteFrame

func (fs *FrameStream) WriteFrame(frame *Frame) error

Jump to

Keyboard shortcuts

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