socket

package
v0.0.0-...-4315464 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2014 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Socket.IO connection stuff

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(controller *deje.DEJEController)

Types

type PrimitiveWrapper

type PrimitiveWrapper struct {
	Type      string            `json:"type"`
	Arguments djstate.Primitive `json:"args"`
}

type Subscription

type Subscription struct {
	Document   djlogic.Document
	IRC        djserv.IRCChannel
	Primitives *djbroad.Subscription
	PConn      djproto.Connection
	// contains filtered or unexported fields
}

A Socket.IO connection may subscribe to a Document, and therefore listen to certain events that pertain to that Document.

The Subscription object "lives" via a goroutine that delivers updates to Socket.IO connection. This is terminated upon disconnect.

func NewSubscription

func NewSubscription(c *deje.DEJEController, url string) (*Subscription, error)

func (*Subscription) Run

func (s *Subscription) Run(ns *socketio.NameSpace)

func (*Subscription) SendState

func (s *Subscription) SendState(ns *socketio.NameSpace)

Send the current docstate as a full-replacement SET primitive.

func (*Subscription) Stop

func (s *Subscription) Stop()

Jump to

Keyboard shortcuts

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