class HlapiSession (Niantic.ARDK.Networking.HLAPI.HlapiSession)
Overview
A IHlapiSession that will hook up with MultipeerNetworkingFactory. More…
class HlapiSession: Niantic.ARDK.Networking.HLAPI.IHlapiSession { public: // structs struct _NetworkIdAndData; // properties IMultipeerNetworking Networking; // methods INetworkGroup CreateAndRegisterGroup(NetworkId groupId); void Dispose(); HlapiSession(uint messageTag); HlapiSession(uint messageTag, IMultipeerNetworking networking); void RegisterGroup(INetworkGroup group); void SendQueuedData(); void UnregisterGroup(INetworkGroup group); };
Inherited Members
public: // properties IMultipeerNetworking Networking; // methods INetworkGroup CreateAndRegisterGroup(NetworkId groupId); void RegisterGroup(INetworkGroup group); void SendQueuedData(); void UnregisterGroup(INetworkGroup group);
Detailed Documentation
A IHlapiSession that will hook up with MultipeerNetworkingFactory.
Methods
INetworkGroup CreateAndRegisterGroup(NetworkId groupId)
Creates a new network group that is attached to this session.
HlapiSession(uint messageTag)
Create an unmanaged HlapiSession (must be manually ticked) that will attach itself to the first IMultipeerNetworking that is created and send all data over that network. If an IMultipeerNetworking has already been initialized, this will automatically attach itself that that networking (will attach itself to the first networking on MultipeerNetworking.Networkings if there are multiple already).
Parameters:
messageTag |
Message tag that all messages pertaining to this manager will use |
HlapiSession(uint messageTag, IMultipeerNetworking networking)
Create an unmanaged HlapiSession (must be manually ticked) that will attach itself to the specified IMultipeerNetworking. This is useful if you want to manage ticking (message batching + sending) behaviour, rather than rely on the automatic per-frame sending behaviour
Parameters:
messageTag |
Message tag that all messages pertaining to this manager will use |
networking |
The networking session this HLAPI session will use |
void RegisterGroup(INetworkGroup group)
Register an existing group to this session.
void SendQueuedData()
Call this to query all attached groups (and their attached INetworkedDataHandlers) for any data that they have accumulated and send that data. The specific data that will be written and sent depends on the implementation of the handler (ie. a transform packer will only check and send the transform at the time of this call, regardless of how many changes there have been between calls to this method, while a message stream will send all queued messages between the previous and current calls). Data that is received will be processed when the message is received, and is independent of calling this method
void UnregisterGroup(INetworkGroup group)
Close the specified group