chatroom

package
Version: v0.0.0-...-8f6461b Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2013 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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL