Documentation ¶
Index ¶
Constants ¶
View Source
const (
MaxMessageLength = 2048
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASCII4BytesHeader ¶
type ASCII4BytesHeader struct {
Len int
}
ASCII4BytesHeader is 4 bytes ASCII encoded length
func NewASCII4BytesHeader ¶
func NewASCII4BytesHeader() *ASCII4BytesHeader
func (*ASCII4BytesHeader) Length ¶
func (h *ASCII4BytesHeader) Length() int
func (*ASCII4BytesHeader) SetLength ¶
func (h *ASCII4BytesHeader) SetLength(length int)
type BCD2BytesHeader ¶
type BCD2BytesHeader struct {
Len int
}
2 bytes of BCD encoded length
func NewBCD2BytesHeader ¶
func NewBCD2BytesHeader() *BCD2BytesHeader
func (*BCD2BytesHeader) Length ¶
func (h *BCD2BytesHeader) Length() int
func (*BCD2BytesHeader) SetLength ¶
func (h *BCD2BytesHeader) SetLength(length int)
type Binary2Bytes ¶ added in v0.4.10
type Binary2Bytes struct {
Len uint16
}
func NewBinary2BytesHeader ¶ added in v0.4.10
func NewBinary2BytesHeader() *Binary2Bytes
func (*Binary2Bytes) Length ¶ added in v0.4.10
func (h *Binary2Bytes) Length() int
func (*Binary2Bytes) ReadFrom ¶ added in v0.4.10
func (h *Binary2Bytes) ReadFrom(r io.Reader) (int, error)
func (*Binary2Bytes) SetLength ¶ added in v0.4.10
func (h *Binary2Bytes) SetLength(length int) error
type Header ¶
type Header interface { // WriteTo encoded length into Writer WriteTo(w io.Writer) (int, error) // ReadFrom reads header (N bytes) from the Reader ReadFrom(r io.Reader) (int, error) // SetLength sets the length of the message SetLength(length int) // Length returns the length of the message Length() int }
Header is network header interface to write/read encoded message legnth
type VMLH ¶ added in v0.4.11
type VMLH struct { Len uint16 // When no message traffic during at least 10 seconds, // Visa sends a session control message (Heartbeat or Idle-Time) // IsSessionControl flag is set to true for such messages IsSessionControl bool }
func NewVMLHeader ¶ added in v0.4.11
func NewVMLHeader() *VMLH
Click to show internal directories.
Click to hide internal directories.