message

package
Version: v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STOP      = "sp"
	TIMEOUT   = "to"
	HEARTBEAT = "hb"
	ERROR     = "err"
	REQUEST   = "req"
	RESPONSE  = "resp"
)

Variables

This section is empty.

Functions

func NewReader

func NewReader(conn net.Conn) *packetReader

func NewWriter

func NewWriter(conn net.Conn) *packetWriter

Types

type Packet

type Packet struct {
	Id     string
	Source string
	Remote string
	Msg    []string
}

type PacketReader

type PacketReader interface {
	Read() (*Packet, error)
}

type PacketWriter

type PacketWriter interface {
	Write(*Packet) error
}

Jump to

Keyboard shortcuts

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