connection

package
v0.0.0-...-af59c4b Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	ID     string
	Player *player.Player

	// Events
	OnClose         chan bool
	OnError         chan error
	InBoundMessage  chan string
	OutBoundMessage chan string
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(id string, player *player.Player, conn *websocket.Conn) *Connection

func (*Connection) Close

func (connection *Connection) Close()

func (*Connection) Id

func (connection *Connection) Id() string

func (*Connection) Write

func (connection *Connection) Write(message string)

type Function

type Function func(connection *Connection, message string) error

Directories

Path Synopsis
handler

Jump to

Keyboard shortcuts

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