interface IRoom
(Niantic.Lightship.SharedAR.Rooms.IRoom)
Overview
A room is an entity to connect multiple peers through server relayed network. The IRoom provides access to properties and network connectivity of the room.
interface IRoom: IDisposable {
// properties
RoomParams RoomParams;
INetworking Networking;
IDatastore Datastore;
// methods
void Initialize();
void Join();
void Leave();
};
Detailed Documentation
A room is an entity to connect multiple peers through server relayed network. The IRoom provides access to properties and network connectivity of the room.
Properties
RoomParams
RoomParams RoomParams
Room properties
Networking
INetworking Networking
Get INetworking object to send/receive data, as well as listening to networking events
Datastore
IDatastore Datastore
Get IDatastore object to access realtime key-value store attached to the room
Methods
Initialize
void Initialize()
Initialize networking connectivity to connect to the room on the server. INetworking should be available after Initialize() is called.
Join
void Join()
Join to the room. After joined to the room, data can be sent and/or received via INetworking.
Leave
void Leave()
Leave from the room. Disconnect from the server and no longer can send/receive data afterwards.