cacophony

package
v0.0.0-...-320a677 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cacophony

type Cacophony struct {
	Sb *Switchboard
}

func (*Cacophony) ServeWs

func (noise *Cacophony) ServeWs(w http.ResponseWriter, r *http.Request)

type Message

type Message struct {
	/*
		op can be:
			say
			nick
			catchup
	*/
	Op      string
	From    string
	To      string
	Payload []string
}

Types of communication: send a message set nick

type Switchboard

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

func NewSwitchboard

func NewSwitchboard() Switchboard

func (*Switchboard) Broadcast

func (sw *Switchboard) Broadcast(msg Message)

func (*Switchboard) Register

func (sw *Switchboard) Register() chan Message

func (*Switchboard) SetNick

func (sw *Switchboard) SetNick(c chan Message, msg Message)

func (*Switchboard) Unregister

func (sw *Switchboard) Unregister(c chan Message)

Jump to

Keyboard shortcuts

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