Guest Class
A guest which might join a Room
.
It will join the room once the client sends 'join' and and leave once it emits the 'left' event.
Constructor
Guest
(
-
conn
-
room_fun
Parameters:
-
conn
ChannelThe connection to the guest
-
room_fun
FunctionFunction which will be called upon joining and which should return the Room to join
Item Index
Events
Methods
closing
()
private
The connection to the guest is closing
error
(
private
-
The
The guest encountered an error
Parameters:
-
The
Errorerror which was encountered
receive
(
private
-
data
The guest receives data
Parameters:
-
data
ObjectThe incoming message
send
(
private
-
data
The guest sends data
Parameters:
-
data
ObjectThe outgoing message
Properties
id
String
The unique identifier of the guest
status
Object
The status object of the guest. Will only be available after joining.