Click or drag to resize

PacketIO Class

Represents IO to/from one packet, or one section of a packet (eg a header, or a packet encapsulated within another packet).
Inheritance Hierarchy

Namespace:  Demo3D.IO
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 15.0.2.11458
Syntax
C#
public abstract class PacketIO : PacketPosition, 
	IOffsetPacketReader, IPacketIO, IDataIO, IDataLocationProvider, IOffsetDataReader, 
	IDataReferenceReader

The PacketIO type exposes the following members.

Constructors
  NameDescription
Protected methodPacketIO
Creates a PacketIO object.
Top
Properties
  NameDescription
Public propertyEndian
Endianess for integral types.
Public propertyID
Optional ID to identify the packet (eg source/destination, packet section, etc).
Public propertyIsFixed
Returns true if this is a fixed size packet. Ensure can't expand a fixed packet.
Public propertyLength
Returns the current length of the packet. The Length of a packet may change without Ensure being called if it's an expandable PacketWriter and data is inserted.
Public propertyParent
Returns the parent packet, or null.
(Inherited from PacketPosition.)
Public propertyPosition
Returns the current position in this packet. The Position of a packet may change without Advance being called if it's an expandable PacketWriter and data is inserted.
Public propertyPositionInParent
Returns the current position with respect to our parent packet.
(Overrides PacketPositionPositionInParent.)
Public propertyRemaining
Returns the remaining data/space available in this packet. If it's a fixed-size packet, then this is definitive. Otherwise Ensure can be used to try to extend the packet with more data/space.
Public propertyTextEncoding
Encoding for text strings.
Public propertyTop
Returns the top parent.
Top
Methods
  NameDescription
Public methodAdvance
Advances the current packet position. Implies Ensure(length).
Public methodEnsure
Ensure that the next length bytes of data/space are available in the packet. If there isn't enough already available, and the packet isn't fixed, then it'll attempt to read more data into or create more space in the packet.
Public methodMarkPosition
Return a position marker.
Top
Extension Methods
  NameDescription
Public Extension MethodReadBit
Reads a bit at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadBoolean
Reads a boolean at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadByte
Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions.)
Public Extension MethodReadBytes(Int32, Int32)Overloaded.
Reads a number of bytes at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadBytes(Int32, ArraySegmentByte)Overloaded.
Reads a number of bytes at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadBytes(Int32, IDataWriter, Int32)Overloaded.
Reads a number of bytes at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadBytes(Int32, Byte, Int32, Int32)Overloaded.
Reads a number of bytes at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadChar
Reads a character at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadDouble(Int32)Overloaded.
Reads a 64bit double floating point number at offset in the buffer.
(Defined by OffsetPacketReaderExtensions.)
Public Extension MethodReadDouble(Int32, Endian)Overloaded.
Reads a 64bit double floating point number at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadDoubleBE
Reads a 64bit double floating point number at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadDoubleLE
Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions.)
Public Extension MethodReadInt16(Int32)Overloaded.
Reads a 16bit signed integer at offset in the buffer.
(Defined by OffsetPacketReaderExtensions.)
Public Extension MethodReadInt16(Int32, Endian)Overloaded.
Reads a 16bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadInt16BE
Reads a 16bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadInt16LE
Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions.)
Public Extension MethodReadInt32(Int32)Overloaded.
Reads a 32bit signed integer at offset in the buffer.
(Defined by OffsetPacketReaderExtensions.)
Public Extension MethodReadInt32(Int32, Endian)Overloaded.
Reads a 32bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadInt32BE
Reads a 32bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadInt32LE
Reads the memory exchange from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions.)
Public Extension MethodReadInt64(Int32)Overloaded.
Reads a 64bit signed integer at offset in the buffer.
(Defined by OffsetPacketReaderExtensions.)
Public Extension MethodReadInt64(Int32, Endian)Overloaded.
Reads a 64bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadInt64BE
Reads a 64bit signed integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadInt64LE
Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions.)
Public Extension MethodReadSByte
Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions.)
Public Extension MethodReadSingle(Int32)Overloaded.
Reads a 32bit single floating point number at offset in the buffer.
(Defined by OffsetPacketReaderExtensions.)
Public Extension MethodReadSingle(Int32, Endian)Overloaded.
Reads a 32bit single floating point number at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadSingleBE
Reads a 32bit single floating point number at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadSingleLE
Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions.)
Public Extension MethodReadString(Int32)Overloaded.
Reads a string at offset in the buffer.
(Defined by OffsetPacketReaderExtensions.)
Public Extension MethodReadString(Int32, BinaryTextEncoding)Overloaded.
Reads a string at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadUInt16
Reads a 16bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadUInt16BE
Reads a 16bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadUInt16LE
Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions.)
Public Extension MethodReadUInt32(Int32)Overloaded.
Reads a 32bit unsigned integer at offset in the buffer.
(Defined by OffsetPacketReaderExtensions.)
Public Extension MethodReadUInt32(Int32, Endian)Overloaded.
Reads a 32bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadUInt32BE
Reads a 32bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadUInt32LE
Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions.)
Public Extension MethodReadUInt64(Int32)Overloaded.
Reads a 64bit unsigned integer at offset in the buffer.
(Defined by OffsetPacketReaderExtensions.)
Public Extension MethodReadUInt64(Int32, Endian)Overloaded.
Reads a 64bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadUInt64BE
Reads a 64bit unsigned integer at offset in the buffer.
(Defined by OffsetDataReaderExtensions.)
Public Extension MethodReadUInt64LE
Reads from the specified offset and returns the data as a value.
(Defined by DataReferenceExtensions.)
Top
See Also