Help us shape the future of Go! Take the 2026 Go Developer Survey

json

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: Apache-2.0 Imports: 6 Imported by: 49

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMsgType      = errors.New("message type error")
	ErrMaxMsgLength = errors.New("message length exceed the limit")
	ErrMsgLength    = errors.New("message length error")
	ErrMsgFormat    = errors.New("message format error")
)

Functions

This section is empty.

Types

type Message

type Message any

Message wraps socket packages for communicating between frpc and frps.

type MsgCtl

type MsgCtl struct {
	// contains filtered or unexported fields
}

func NewMsgCtl

func NewMsgCtl() *MsgCtl

func (*MsgCtl) Pack

func (msgCtl *MsgCtl) Pack(msg Message) ([]byte, error)

func (*MsgCtl) ReadMsg

func (msgCtl *MsgCtl) ReadMsg(c io.Reader) (msg Message, err error)

func (*MsgCtl) ReadMsgInto

func (msgCtl *MsgCtl) ReadMsgInto(c io.Reader, msg Message) (err error)

func (*MsgCtl) RegisterMsg

func (msgCtl *MsgCtl) RegisterMsg(typeByte byte, msg any)

func (*MsgCtl) SetMaxMsgLength

func (msgCtl *MsgCtl) SetMaxMsgLength(length int64)

func (*MsgCtl) UnPack

func (msgCtl *MsgCtl) UnPack(typeByte byte, buffer []byte) (msg Message, err error)

func (*MsgCtl) UnPackInto

func (msgCtl *MsgCtl) UnPackInto(buffer []byte, msg Message) (err error)

func (*MsgCtl) WriteMsg

func (msgCtl *MsgCtl) WriteMsg(c io.Writer, msg any) (err error)

Jump to

Keyboard shortcuts

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