room

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Room

type Room struct {
	*sync.Mutex
	// contains filtered or unexported fields
}

func NewRoom

func NewRoom(roomId string) *Room

func (*Room) AddPeer

func (room *Room) AddPeer(newPeer *peer.Peer)

func (*Room) Close

func (room *Room) Close()

func (*Room) CreatePeer

func (room *Room) CreatePeer(peerId string, transport *transport.WebSocketTransport) *peer.Peer

func (*Room) GetPeer

func (room *Room) GetPeer(peerId string) *peer.Peer

func (*Room) GetPeers

func (room *Room) GetPeers() map[string]*peer.Peer

func (*Room) HasPeer

func (room *Room) HasPeer(peerId string) bool

func (*Room) ID

func (room *Room) ID() string

func (*Room) Map

func (room *Room) Map(fn func(string, *peer.Peer))

func (*Room) Notify

func (room *Room) Notify(from *peer.Peer, method string, data interface{})

func (*Room) RemovePeer

func (room *Room) RemovePeer(peerId string)

Jump to

Keyboard shortcuts

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