3rd Eye Scene C#
3rd Eye Scene C# documentation
Tes::IO::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.

Properties

bool Decoding [get]
 True while we have more packets to decode/extract.

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. Whilst .Net Core source code is available and can be ported, the managed implementation supports only one, default compression level. The default .Net Core GZip implementation uses native ZLib, which cannot be supported herre to maintain higher platform independence. In the end we use a DotNetZip NuGet package.


Member Function Documentation

PacketBuffer Tes::IO::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::IO::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