emitter

package
v0.0.0-...-5c77d7d Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2014 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseChannel

func CloseChannel(channelid string)

func Emit

func Emit(message struct{ Content, Id string })

Emit an event

Types

type Broker

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

func New

func New() *Broker

Initialize a new Broker

func (*Broker) ServeHTTP

func (b *Broker) ServeHTTP(w http.ResponseWriter, r *http.Request)

This Broker method handles an HTTP request

func (*Broker) Start

func (b *Broker) Start()

This Broker method starts a new goroutine. It handles the addition & removal of clients, as well as the broadcasting of messages out to clients that are currently attached.

Jump to

Keyboard shortcuts

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