Documentation ¶
Overview ¶
Package transmitter
packet layer:
+---------------------------------------------------------------+ | symbol(2) | blank(1) | length(2) | blank(1) | payload(n) ... | +---------------------------------------------------------------+ |<- header(6) ->|-- data(n) ->| +---------------------------------------------------------------+ |<- packet(6+n) ->| +---------------------------------------------------------------+
Index ¶
- Variables
- type ConcurrencyIO
- func (io *ConcurrencyIO) Close() error
- func (io *ConcurrencyIO) LocalAddr() net.Addr
- func (io *ConcurrencyIO) Read(p []byte) (n int, err error)
- func (io *ConcurrencyIO) ReadOnePacket() (p []byte, n int, err error)
- func (io *ConcurrencyIO) RemoteAddr() net.Addr
- func (io *ConcurrencyIO) SetDeadline(t time.Time) error
- func (io *ConcurrencyIO) SetReadDeadline(t time.Time) error
- func (io *ConcurrencyIO) SetWriteDeadline(t time.Time) error
- func (io *ConcurrencyIO) Write(p []byte) (n int, err error)
- type IO
- func (io *IO) Close() error
- func (io *IO) LocalAddr() net.Addr
- func (io *IO) Read(p []byte) (n int, err error)
- func (io *IO) ReadOnePacket() (p []byte, n int, err error)
- func (io *IO) RemoteAddr() net.Addr
- func (io *IO) SetDeadline(t time.Time) error
- func (io *IO) SetReadDeadline(t time.Time) error
- func (io *IO) SetWriteDeadline(t time.Time) error
- func (io *IO) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadPacket = errors.New("bad packet") ErrBadHeader = errors.New("bad header") )
View Source
var ( DefaultSymbol = []byte{255, 254} Empty = make([]byte, 0) Blank = byte(0) )
Functions ¶
This section is empty.
Types ¶
type ConcurrencyIO ¶ added in v0.0.2
type ConcurrencyIO struct {
// contains filtered or unexported fields
}
func WrapConcurrentConn ¶ added in v0.0.2
func WrapConcurrentConn(conn net.Conn) *ConcurrencyIO
func (*ConcurrencyIO) Close ¶ added in v0.0.2
func (io *ConcurrencyIO) Close() error
func (*ConcurrencyIO) LocalAddr ¶ added in v0.0.6
func (io *ConcurrencyIO) LocalAddr() net.Addr
func (*ConcurrencyIO) Read ¶ added in v0.0.2
func (io *ConcurrencyIO) Read(p []byte) (n int, err error)
func (*ConcurrencyIO) ReadOnePacket ¶ added in v0.0.6
func (io *ConcurrencyIO) ReadOnePacket() (p []byte, n int, err error)
func (*ConcurrencyIO) RemoteAddr ¶ added in v0.0.6
func (io *ConcurrencyIO) RemoteAddr() net.Addr
func (*ConcurrencyIO) SetDeadline ¶ added in v0.0.6
func (io *ConcurrencyIO) SetDeadline(t time.Time) error
func (*ConcurrencyIO) SetReadDeadline ¶ added in v0.0.6
func (io *ConcurrencyIO) SetReadDeadline(t time.Time) error
func (*ConcurrencyIO) SetWriteDeadline ¶ added in v0.0.6
func (io *ConcurrencyIO) SetWriteDeadline(t time.Time) error
type IO ¶ added in v0.0.2
type IO struct {
// contains filtered or unexported fields
}
func (*IO) ReadOnePacket ¶ added in v0.0.6
func (*IO) RemoteAddr ¶ added in v0.0.6
Click to show internal directories.
Click to hide internal directories.