hub

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2016 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapPutWebsocketConn

func WrapPutWebsocketConn(put func(Conn)) func(*websocket.Conn)

WrapPutWebsocketConn wraps func(Conn) to func(*websocket.Conn)

Types

type Conn

type Conn interface {
	Write([]byte) error
}

Conn describes a connection's behaviour

type Hub

type Hub interface {
	PutConn(Conn)
	Broadcast([]byte)
	Len() int
}

Hub maintains active connections and broadcast messages

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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