class UnhandledPacketCache (Niantic.ARDK.Networking.HLAPI.UnhandledPacketCache)

Overview

Definition of a class that caches and handles packets belonging to unknown Groups/Handlers. Follows the Group/Handler hierarchy (one UnhandledPacketCache per group, with a dictionary of strings, which map to handlers' Identifiers). More...

class UnhandledPacketCache {
public:
    // fields

    readonly Dictionary<string, Queue<PacketInfo>> PacketLookup =       new Dictionary<string, Queue<PacketInfo>>();

    // methods

    void AttemptCachePayload(
        object data,
        IPeer sender,
        ReplicationMode replicationMode
    );

    void HandleCached(string identifier, NetworkedDataHandlerBase handler);
};

Detailed Documentation

Definition of a class that caches and handles packets belonging to unknown Groups/Handlers. Follows the Group/Handler hierarchy (one UnhandledPacketCache per group, with a dictionary of strings, which map to handlers' Identifiers).

Methods

void AttemptCachePayload(
    object data,
    IPeer sender,
    ReplicationMode replicationMode
)

Attempt to cache a payload in this group. Shares a static data count with all other cached packets sent through the HLAPI.

Parameters:

data

Payload to cache

sender

Peer that sent the data

replicationMode

Information about the transport type and whether it is an initial message

void HandleCached(string identifier, NetworkedDataHandlerBase handler)

Handle data that is cached with the handler's Identifier

Parameters:

identifier

Identifier to look for in cached packets

handler

Handler to handle cached data with