encoder

package
v0.0.0-...-4e74fe6 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeMessage

func DecodeMessage[T any](data []byte) (T, error)

DecodeMessage decodes a message.

func EncodeMessage

func EncodeMessage(message any) ([]byte, error)

EncodeMessage encodes a message.

func ReadMessage

func ReadMessage(conn net.Conn) ([]byte, error)

ReadMessage reads a message.

func WriteHeartbeatRequest

func WriteHeartbeatRequest(conn net.Conn) error

WriteHeartbeatRequest writes a heartbeat request.

func WriteHeartbeatResponse

func WriteHeartbeatResponse(conn net.Conn, id string) error

WriteHeartbeatResponse writes a heartbeat response.

func WriteMessage

func WriteMessage(conn net.Conn, msg []byte) error

WriteMessage writes a message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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