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
SystemObject
  Demo3D.IOPacketPosition
    Demo3D.IOPacketIO
      Demo3D.IOPacketReader
      Demo3D.IOPacketWriter

Namespace:  Demo3D.IO
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 11.0.0.7658
Syntax
C#
public abstract class PacketIO : PacketPosition, 
	IOffsetDataReader

The PacketIO type exposes the following members.

Constructors
  NameDescription
Protected methodPacketIO
Creates a PacketIO object.
Top
Properties
  NameDescription
Public propertyDataLengthOfParent
Returns the length in bytes from this position to the current parent packet Position. For a PacketReader this is the length from this PacketPosition to our parents current Position. For a PacketWriter it's the length from this PacketPosition to the end of our Parent packet.
(Inherited from PacketPosition.)
Public propertyEndian
Endianess for integral types.
Public propertyID
Optional ID used in error messages.
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.
Protected propertyLengthToCurrentPositionOfParent
Returns the length in bytes from this position to the current position of our parent packet.
(Inherited from PacketPosition.)
Protected propertyLengthToEndOfParent
Returns the length in bytes from this position to the end of our parent packet.
(Overrides PacketPositionLengthToEndOfParent.)
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.
Protected methodGetBuffer
Get a buffer that covers a specific portion of the packet.
Protected methodGetEndian
Returns the current endian format.
Protected methodGetTextEncoding
Returns the current text encoding.
Protected methodLengthAfterChild
Returns the length of the this packet after the end of a given direct child packet position.
Public methodMarkPosition
Return a position marker.
Protected methodPositionOfChild
Returns the current absolute position of a direct child packet position.
Public methodReadBit
Reads a bit at offset in the buffer.
Public methodReadBoolean
Reads a boolean at offset in the buffer.
Public methodReadByte
Reads a byte at offset in the buffer.
Public methodReadBytes(Int32, Buffer)
Reads a number of bytes at offset in the buffer.
Public methodReadBytes(Int32, Int32)
Reads a number of bytes at offset in the buffer.
Public methodReadBytes(Int32, PacketWriter, Int32)
Reads a number of bytes at offset in the buffer.
Public methodReadBytes(Int32, Byte, Int32, Int32)
Reads a number of bytes at offset in the buffer.
Public methodReadChar
Reads a character at offset in the buffer.
Public methodReadDouble
Reads a 64bit double floating point number at offset in the buffer.
Public methodReadDoubleBE
Reads a 64bit double floating point number at offset in the buffer.
Public methodReadDoubleLE
Reads a 64bit double floating point number at offset in the buffer.
Public methodReadInt16
Reads a 16bit signed integer at offset in the buffer.
Public methodReadInt16BE
Reads a 16bit signed integer at offset in the buffer.
Public methodReadInt16LE
Reads a 16bit signed integer at offset in the buffer.
Public methodReadInt32
Reads a 32bit signed integer at offset in the buffer.
Public methodReadInt32BE
Reads a 32bit signed integer at offset in the buffer.
Public methodReadInt32LE
Reads a 32bit signed integer at offset in the buffer.
Public methodReadInt64
Reads a 64bit signed integer at offset in the buffer.
Public methodReadInt64BE
Reads a 64bit signed integer at offset in the buffer.
Public methodReadInt64LE
Reads a 64bit signed integer at offset in the buffer.
Public methodReadSByte
Reads a signed byte at offset in the buffer.
Public methodReadSingle
Reads a 32bit single floating point number at offset in the buffer.
Public methodReadSingleBE
Reads a 32bit single floating point number at offset in the buffer.
Public methodReadSingleLE
Reads a 32bit single floating point number at offset in the buffer.
Public methodReadString(Int32)
Reads a string at offset in the buffer.
Public methodReadString(Int32, BinaryTextEncoding)
Reads a string at offset in the buffer.
Public methodReadUInt16
Reads a 16bit unsigned integer at offset in the buffer.
Public methodReadUInt16BE
Reads a 16bit unsigned integer at offset in the buffer.
Public methodReadUInt16LE
Reads a 16bit unsigned integer at offset in the buffer.
Public methodReadUInt32
Reads a 32bit unsigned integer at offset in the buffer.
Public methodReadUInt32BE
Reads a 32bit unsigned integer at offset in the buffer.
Public methodReadUInt32LE
Reads a 32bit unsigned integer at offset in the buffer.
Public methodReadUInt64
Reads a 64bit unsigned integer at offset in the buffer.
Public methodReadUInt64BE
Reads a 64bit unsigned integer at offset in the buffer.
Public methodReadUInt64LE
Reads a 64bit unsigned integer at offset in the buffer.
Top
See Also