stream

package
v0.0.0-...-a35f291 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FrameCommandMask uint16 = 0x08000
	FrameSizeMask    uint16 = 0x07FFF
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandFrame

type CommandFrame struct {
	CommandID CommandID /* Command ID  */
	Body      []byte
}

type CommandID

type CommandID byte
const (
	M_NUL  CommandID = 0
	M_ADR  CommandID = 1
	M_PWD  CommandID = 2
	M_FILE CommandID = 3
	M_OK   CommandID = 4
	M_EOB  CommandID = 5
	M_GOT  CommandID = 6
	M_ERR  CommandID = 7
	M_BSY  CommandID = 8
	M_GET  CommandID = 9
	M_SKIP CommandID = 10
)

func (CommandID) String

func (self CommandID) String() string

type DataFrame

type DataFrame struct {
	Body []byte
}

type Frame

type Frame struct {
	Command bool
	DataFrame
	CommandFrame
}

func (Frame) IsCommandFrame

func (self Frame) IsCommandFrame() bool

func (Frame) IsDataFrame

func (self Frame) IsDataFrame() bool

type MailerFrameLayer

type MailerFrameLayer struct {
}

func NewFrameLayer

func NewFrameLayer() *MailerFrameLayer

type MailerStream

type MailerStream struct {
	InFrameReady  chan interface{}
	OutFrameReady chan interface{}

	InFrame  chan Frame
	OutFrame chan Frame
	// contains filtered or unexported fields
}

func NewMailerStream

func NewMailerStream() *MailerStream

func (*MailerStream) CloseSession

func (self *MailerStream) CloseSession() error

func (*MailerStream) OpenSession

func (self *MailerStream) OpenSession(remoteSystem string) error

func (*MailerStream) WriteAddress

func (self *MailerStream) WriteAddress(addr string) error

func (*MailerStream) WriteCommandPacket

func (self *MailerStream) WriteCommandPacket(commandID CommandID, msgBody []byte) error

func (*MailerStream) WriteComment

func (self *MailerStream) WriteComment(comment string) error

func (*MailerStream) WriteData

func (self *MailerStream) WriteData(chunk []byte) error

func (*MailerStream) WriteHeader

func (self *MailerStream) WriteHeader(stat string) error

func (*MailerStream) WriteInfo

func (self *MailerStream) WriteInfo(name string, value string) error

func (*MailerStream) WritePassword

func (self *MailerStream) WritePassword(password string) error

Jump to

Keyboard shortcuts

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