delegate

package
v0.0.0-...-91c7ab2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientMessageDelegate

type ClientMessageDelegate interface {
	OnConnected(id int64, ncs string)
	OnConnectionLost(id int64, reason error)

	OnMessage(id int64, data interface{}, writer ResponseWriter)
}

type CodecDelegate

type CodecDelegate interface {
	Marshal(d interface{}) (bytes []byte, err error)
	Unmarshal(bytes []byte) (d interface{}, index int, err error)
	UnmarshalContinueFlag(unmarshalErr error) bool
}

type ReadWriteCloser

type ReadWriteCloser struct {
	io.ReadWriteCloser
	Desc string
}

type RecorderDelegate

type RecorderDelegate interface {
	Record(id int64, direction RecorderDirection, d []byte, err error)
}

type RecorderDirection

type RecorderDirection uint8
const (
	RecorderDirection_Sender RecorderDirection = iota + 1
	RecorderDirection_Receiver
)

func (RecorderDirection) String

func (i RecorderDirection) String() string

type ResponseWriter

type ResponseWriter interface {
	Write(data interface{}) error
}

type ServerMessageDelegate

type ServerMessageDelegate interface {
	OnConnected(id int64, ncs string, parentID int64)
	OnConnectionLost(id int64, reason error)

	OnMessage(id int64, data interface{}, writer ResponseWriter)
}

Jump to

Keyboard shortcuts

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