Skip to main content
Version: 3.8

struct DataReceivedArgs

(Niantic.Lightship.SharedAR.Networking.DataReceivedArgs)

Overview

Event args fired from INetworking.DataReceived.

struct DataReceivedArgs {
// properties

PeerID PeerID;
uint Tag;
int DataLength;

// methods

DataReceivedArgs(PeerID peerID, uint tag, byte[] data);
MemoryStream CreateDataReader();
byte[] CopyData();
};

Detailed Documentation

Event args fired from INetworking.DataReceived.

Properties

PeerID

PeerID PeerID

Id of the peer that is sending the data.

Tag

uint Tag

The tag that catagorizes the sent message.

DataLength

int DataLength

The length of the message.

Methods

CreateDataReader

MemoryStream CreateDataReader()

Create a MemoryStream to read the message.     Returns:     A MemoryStream pointed at the message

CopyData

byte[] CopyData()

Make a full copy of the message.     Returns:     A copy of the message