Documentation
¶
Index ¶
- func Connect(ctx context.Context, conn gomasio.Conn, handler Handler) error
- func NewWriter(wf gomasio.WriteFlusher, packetType PacketType) gomasio.WriteFlusher
- func NewWriterFactory(wf gomasio.WriterFactory) gomasio.WriterFactory
- func WritePing(w io.Writer) error
- type Decoder
- type Encoder
- type HandleFunc
- type Handler
- type Packet
- type PacketType
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWriter ¶
func NewWriter(wf gomasio.WriteFlusher, packetType PacketType) gomasio.WriteFlusher
func NewWriterFactory ¶
func NewWriterFactory(wf gomasio.WriterFactory) gomasio.WriterFactory
Types ¶
type HandleFunc ¶
type HandleFunc func(wf gomasio.WriterFactory, body io.Reader)
func (HandleFunc) HandleMessage ¶
func (f HandleFunc) HandleMessage(wf gomasio.WriterFactory, body io.Reader)
type Packet ¶
type Packet struct {
Type PacketType
Body io.Reader
}
type PacketType ¶
type PacketType int
const ( OPEN PacketType = iota CLOSE PING PONG MESSAGE UPGRADE NOOP INVALID PacketType = -1 )
Click to show internal directories.
Click to hide internal directories.