Connection Class
Represents a connection to another Wasabi instance.
Connections are sent objects according to their visibility groups, which can
be set using addGroup
and removeGroup
, and created with
Wasabi.createGroup
. Connections start with no visibility groups. A
connection with zero visibility groups will be sent all objects known to
its Wasabi instance. If you want to send no objects to a connection, add
an empty group to it.
Constructor
Connection
(
private
-
socket
-
ghostFrom
-
ghostTo
Parameters:
-
socket
SocketThe socket.io socket used to communicate with the remote host
-
ghostFrom
BooleanAccept ghosted NetObject from this client
-
ghostTo
BooleanGhost NetObjects to this client
Item Index
Methods
Methods
getObjectsInGroups
()
Object
Get a collection of all objects in the connection's groups
Returns:
Object:
A hash of serial numbers -> objects
removeGroup
(
-
group
Remove a group from this connection
Parameters:
-
group
Group | NumberThe group or index to remove