protocol

package
v0.0.0-...-70b4a1e Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

package protocol provides function for read/write messages between raw socket client and server.

The protocol is simple, each protocol package has following parts:

  • size: 2 bytes, big-endian unsigned int16 value.
  • body: up to 65535 bytes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadMessage

func ReadMessage(r io.Reader, msg proto.Message) (err error)

func WriteMessage

func WriteMessage(w io.Writer, msg proto.Message) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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