Documentation
¶
Index ¶
- Constants
- func BaseHandler(connection net.Conn, ...) bool
- func BytesToInts(buffer []byte) []int
- func CreatePacket(messageType byte, event byte, data []byte) []byte
- func CreateResponsePacket(data []int) []byte
- func DeserializeBorders(data []byte) (*utilsgo.Vector, *utilsgo.Vector, *utilsgo.Vector, *utilsgo.Vector)
- func DeserializeMatrix(packet []byte) *utilsgo.Matrix
- func DeserializeVector(packet []byte) *utilsgo.Vector
- func IntsToBytes(buffer []int) []byte
- func ReadPacket(conn net.Conn) (byte, byte, []byte)
- func ReadRaw(connection net.Conn, size int) []byte
- func ReadResponsePacket(conn net.Conn) ([]byte, int)
- func SendBadResponse(connection net.Conn)
- func SendOkResponse(connection net.Conn)
- func SerializeBorders(top, bottom, left, right *utilsgo.Vector) []byte
- func SerializeMatrix(matrix *utilsgo.Matrix) []int
- func SerializeVector(vector *utilsgo.Vector) []byte
- func WriteRaw(connection net.Conn, buffer []byte)
- type Client
- type Server
Constants ¶
View Source
const EVENT_GET byte = 5
View Source
const EVENT_LOG byte = 8
View Source
const EVENT_MOUSE_CLICK byte = 2
View Source
const EVENT_PAUSE byte = 1
View Source
const EVENT_SET_BORDERS byte = 6
View Source
const EVENT_UPDATE byte = 7
View Source
const EVENT_UPDATE_RATE_DECREASE byte = 4
View Source
const EVENT_UPDATE_RATE_INCREASE byte = 3
View Source
const MAX_PACKET_LEN = 65535
View Source
const MAX_RETRIES = 1000
View Source
const MAX_TIMEOUT = 1 * 1000 * 1000 * 1000
View Source
const MESSAGE_CLOSE byte = 9
View Source
const MESSAGE_ERROR byte = 2
View Source
const MESSAGE_EVENT byte = 3
View Source
const MESSAGE_PING byte = 1
Variables ¶
This section is empty.
Functions ¶
func BaseHandler ¶
func BytesToInts ¶
func CreateResponsePacket ¶
func DeserializeBorders ¶
func DeserializeMatrix ¶
func DeserializeVector ¶
func IntsToBytes ¶
func SendBadResponse ¶
func SendOkResponse ¶
func SerializeBorders ¶
func SerializeMatrix ¶
func SerializeVector ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.