signal

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPeer

func AddPeer(rid string, peer *Peer)

func DelPeer

func DelPeer(rid, id string)

func HasPeer

func HasPeer(rid string, peer *Peer) bool

func Init

func Init(host string, port int, cert, key string, bizEntry func(method string, peer *Peer, msg json.RawMessage, accept RespondFunc, reject RejectFunc))

func NotifyAll

func NotifyAll(rid string, method string, msg map[string]interface{})

func NotifyAllWithoutID

func NotifyAllWithoutID(rid string, skipID string, method string, msg map[string]interface{})

func NotifyAllWithoutPeer

func NotifyAllWithoutPeer(rid string, peer *Peer, method string, msg map[string]interface{})

Types

type AcceptFunc

type AcceptFunc peer.AcceptFunc

type Peer

type Peer struct {
	peer.Peer
}

func (*Peer) Close

func (c *Peer) Close()

func (*Peer) Request

func (c *Peer) Request(method string, data map[string]interface{})

type RejectFunc

type RejectFunc peer.RejectFunc

type RespondFunc added in v0.3.0

type RespondFunc peer.RespondFunc

type Room

type Room struct {
	room.Room
}

func GetRoomByPeer

func GetRoomByPeer(id string) *Room

one peer in one room

func GetRoomsByPeer

func GetRoomsByPeer(id string) []*Room

one peer in many room

func (*Room) AddPeer

func (r *Room) AddPeer(peer *Peer)

func (*Room) ID

func (r *Room) ID() string

Jump to

Keyboard shortcuts

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