echo

package
v0.0.0-...-1e5eb42 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EchoMessage     int32 = 1
	EchoMessageName       = "EchoMessage"
)

Variables

This section is empty.

Functions

func DeserializeMessage

func DeserializeMessage(data []byte) (message tao.Message, err error)

DeserializeMessage deserializes bytes into Message.

func ProcessMessage

func ProcessMessage(ctx context.Context, conn tao.WriteCloser)

ProcessMessage process the logic of echo message.

Types

type Message

type Message struct {
	Content string
}

Message defines the echo message.

func (Message) RequestCommand

func (em Message) RequestCommand() int32

RequestCommand returns request command.

func (Message) RequestName

func (em Message) RequestName() string

RequestName returns request name.

func (Message) ResponseCommand

func (em Message) ResponseCommand() int32

ResponseCommand returns response command.

func (Message) ResponseName

func (em Message) ResponseName() string

ResponseName returns response name.

func (Message) Serialize

func (em Message) Serialize() ([]byte, error)

Serialize serializes Message into bytes.

func (Message) SetCustom

func (em Message) SetCustom(interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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