stream

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FrameSize = 51200
)

Functions

This section is empty.

Types

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) ReadFrame

func (fs *FrameStream) ReadFrame() (*Frame, 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