message

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageServer

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

func NewMessageServer

func NewMessageServer(codecHelper *codec.CodecHelper, dispatchServer *dispatch.DispatchServer) *MessageServer

func (*MessageServer) CallMessageHandler

func (m *MessageServer) CallMessageHandler(ctx context.Context, sess *session.Session, in *packet.Packet) error

CallMessageHandler 调用消息处理器

func (*MessageServer) DecodeMessage

func (m *MessageServer) DecodeMessage(data []byte) (*packet.Packet, error)

DecodeMessage 解码消息

func (*MessageServer) EncodeMessage

func (m *MessageServer) EncodeMessage(in interface{}, name ...string) (*packet.Packet, error)

EncodeMessage 编码消息

func (*MessageServer) RegisterComponent

func (m *MessageServer) RegisterComponent(sd component.ComponentDesc, ss interface{})

RegisterComponent 注册组件

func (*MessageServer) UseDefaultEncodeJSON

func (m *MessageServer) UseDefaultEncodeJSON()

UseDefaultEncodeJSON 设置默认编码器

func (*MessageServer) UseDefaultEncodeProto

func (m *MessageServer) UseDefaultEncodeProto()

UseDefaultEncodeJSON 设置默认编码器

func (*MessageServer) UseDefaultEncodePureJSON added in v0.3.1

func (m *MessageServer) UseDefaultEncodePureJSON()

UseDefaultEncodeJSON 设置默认编码器

Jump to

Keyboard shortcuts

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