engine

package
v0.0.0-...-d60a977 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client model

func NewClient

func NewClient(ws *websocket.Conn, name string) *Client

NewClient is a constructor

func (*Client) Listen

func (c *Client) Listen()

Listen "write" and "read" events

func (*Client) Say

func (c *Client) Say(text string)

Say some text

type Message

type Message struct {
	Author string `json:"author"`
	Body   string `json:"body"`
}

Message model

func (*Message) String

func (m *Message) String() string

String – model to string

Jump to

Keyboard shortcuts

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