myws

package
v0.0.0-...-089fcdc Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	MsgName string      `json:"name"`
	Reply   string      `json:"reply,omitempty"`
	Trigger string      `json:"trigger,omitempty"`
	Data    interface{} `json:"data,omitempty"`
}

func (*Message) Message

func (m *Message) Message() interface{}

func (*Message) String

func (m *Message) String() string

type MsgHooker

type MsgHooker struct {
}

MsgHooker 带有RPC和relay功能

func (MsgHooker) OnInboundEvent

func (self MsgHooker) OnInboundEvent(inputEvent cellnet.Event) (outputEvent cellnet.Event)

func (MsgHooker) OnOutboundEvent

func (self MsgHooker) OnOutboundEvent(inputEvent cellnet.Event) (outputEvent cellnet.Event)

type WSMessageTransmitter

type WSMessageTransmitter struct {
}

func (WSMessageTransmitter) OnRecvMessage

func (WSMessageTransmitter) OnRecvMessage(ses cellnet.Session) (msg interface{}, err error)

func (WSMessageTransmitter) OnSendMessage

func (WSMessageTransmitter) OnSendMessage(ses cellnet.Session, msg interface{}) error

Jump to

Keyboard shortcuts

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