chat

package
v0.0.0-...-2c485cb Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ChatMessage is the message number of chat message.
	ChatMessage int32 = 1
)

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 handles the Message logic.

Types

type Message

type Message struct {
	Content string
}

Message defines the chat message.

func (Message) MessageNumber

func (cm Message) MessageNumber() int32

MessageNumber returns the message number.

func (Message) Serialize

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

Serialize Serializes Message into bytes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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