3rd Eye Scene C#
3rd Eye Scene C# documentation
Tes::Util::CollatedPacketDecoder Class Reference

A utility class for decoding CollatedPacketMessage packets. More...

List of all members.

Public Member Functions

bool SetPacket (PacketBuffer packet)
 Sets the packet to decode.
PacketBuffer Next ()
 Extracts the next packet from the collated buffer.

Detailed Description

A utility class for decoding CollatedPacketMessage packets.

Unity does not support classes from

System.IO.Compression

, thus we can't use

GZipStream

from there directly. Fortunately, with Microsoft releasing much of the .Net core as open source code, some helpful people at http://www.hitcents.com/ have migrated the

GZipStream

into a Unity asset. This has been imported into the

Tes.IO.Compression

namespace.

The zip code asset is available from here: https://www.assetstore.unity3d.com/en/#!/content/31902 Courtesy of http://www.hitcents.com/

Note: This class is currently very slow in decoding collated and compress packets. Needs to be improved to have less buffer allocation.


Member Function Documentation

PacketBuffer Tes::Util::CollatedPacketDecoder::Next ( ) [inline]

Extracts the next packet from the collated buffer.

Returns:

For collated packets, this decodes and decompresses the next packet. For non-collated packets, this simply returns the packet given to PacketBuffer, then

null

on the following call.

bool Tes::Util::CollatedPacketDecoder::SetPacket ( PacketBuffer  packet) [inline]

Sets the packet to decode.

Parameters:
packet

The packet need not be a collated packet, in which case it will be immediately returned on calling Next(), followed by

null

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events