interface IHlapiSession (Niantic.ARDK.Networking.HLAPI.IHlapiSession)

Overview

Responsible for replicating registered groups and their data across the network, by addressing and routing messages so that a registered data handler will always receive data from its corresponding data handler (on the other end of the networking object). Implementations of this interface use an IMultipeerNetworking object to send and receive messages. More...

interface IHlapiSession: IDisposable {
    // properties

    IMultipeerNetworking Networking;

    // methods

    INetworkGroup CreateAndRegisterGroup(NetworkId groupId);
    void RegisterGroup(INetworkGroup group);
    void SendQueuedData();
    void UnregisterGroup(INetworkGroup group);
};

// direct descendants

class HlapiSession;

Detailed Documentation

Responsible for replicating registered groups and their data across the network, by addressing and routing messages so that a registered data handler will always receive data from its corresponding data handler (on the other end of the networking object). Implementations of this interface use an IMultipeerNetworking object to send and receive messages.

Properties

IMultipeerNetworking Networking

The networking object that this session is attached to. May be null if the session is created with no networking object. In that case, this will become the first initialized IMultipeerNetworking object, and all data will be passed along that network.

Methods

INetworkGroup CreateAndRegisterGroup(NetworkId groupId)

Creates a new network group that is attached to this session.

Parameters:

groupId

Unique identifier for this group, equivalent to a ulong

void RegisterGroup(INetworkGroup group)

Register an existing group to this session.

Parameters:

group

void SendQueuedData()

Query all network groups attached to this session to write any relevant data that their data handlers have accumulated since the last call of this method to buffers, then send the buffers to each relevant peer.

void UnregisterGroup(INetworkGroup group)

Close the specified group

Parameters:

group

Group to remove from this session