chatroom

package
v0.0.0-...-1d6a714 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2012 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(user string)

func Leave

func Leave(user string)

func Say

func Say(user, message string)

Types

type Event

type Event struct {
	Type      string // "join", "leave", or "message"
	User      string
	Timestamp int    // Unix timestmap (secs)
	Text      string // What the user said (if Type == "say")
}

type Subscription

type Subscription struct {
	Archive []Event      // All the events from the archive.
	New     <-chan Event // New events coming in.
}

func Subscribe

func Subscribe() Subscription

func (Subscription) Cancel

func (s Subscription) Cancel()

Owner of a subscription must cancel it when they stop listening to events.

Jump to

Keyboard shortcuts

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