signal

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: MIT Imports: 12 Imported by: 0

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) On

func (p *Peer) On(event, listener interface{})

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