realtime

package
v0.0.0-...-053ca1e Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener struct {
	Conn   *websocket.Conn
	Id     string
	Method string
}

func (*Listener) Receive

func (l *Listener) Receive(res *cyako.Res)

type Realtime

type Realtime struct {
	// Dependences        dep
	KVStore            *kvstore.KVStore
	NameScopeListeners ns.Scope
}

func (*Realtime) AddListener

func (r *Realtime) AddListener(groupName string, conn *websocket.Conn, id string, method string)

This method add specific *websocket.Conn to listeners list

func (*Realtime) AddListenerDefault

func (r *Realtime) AddListenerDefault(groupName string, ctx *cyako.Ctx)

func (*Realtime) Send

func (r *Realtime) Send(groupName string, res *cyako.Res)

Send response to listeners in some group

Jump to

Keyboard shortcuts

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