Property | Type | Description |
---|
Method | Description | |
---|---|---|
Done ( ) : void |
Indicates that the packet has been read and its data is no longer needed.
|
|
PeekByte ( ) : byte |
Reads the next byte from the packet. Does not advance the position counter.
|
|
Read ( byte buffer, int index, int count ) : int |
Reads the specified number of bytes from the packet into the buffer specified and advances the position counter.
|
|
ReadBit ( ) : bool |
Reads the next bit from the packet and advances the position counter.
|
|
ReadBits ( int count ) : ulong |
Reads the specified number of bits from the packet and advances the position counter.
|
|
ReadByte ( ) : byte |
Reads the next byte from the packet and advances the position counter.
|
|
ReadBytes ( int count ) : byte[] |
Reads the specified number of bytes from the packet and advances the position counter.
|
|
ReadInt16 ( ) : short |
Retrieves the next 16 bits from the packet as a short and advances the position counter.
|
|
ReadInt32 ( ) : int |
Retrieves the next 32 bits from the packet as a int and advances the position counter.
|
|
ReadInt64 ( ) : long |
Retrieves the next 64 bits from the packet as a long and advances the position counter.
|
|
ReadUInt16 ( ) : ushort |
Retrieves the next 16 bits from the packet as a ushort and advances the position counter.
|
|
ReadUInt32 ( ) : uint |
Retrieves the next 32 bits from the packet as a uint and advances the position counter.
|
|
ReadUInt64 ( ) : ulong |
Retrieves the next 64 bits from the packet as a ulong and advances the position counter.
|
|
SkipBits ( int count ) : void |
Advances the position counter by the specified number of bits.
|
|
SkipBytes ( int count ) : void |
Advances the position counter by the specified number of bytes.
|
|
TryPeekBits ( int count, int &bitsRead ) : ulong |
Attempts to read the specified number of bits from the packet, but may return fewer. Does not advance the position counter.
|
Method | Description | |
---|---|---|
DataPacket ( int length ) : System |
Creates a new instance with the specified length.
|
|
GetFlag ( PacketFlags flag ) : bool |
Gets the value of the specified flag.
|
|
ReadNextByte ( ) : int |
Reads the next byte of the packet.
|
|
ResetBitReader ( ) : void |
Resets the bit reader.
|
|
SetFlag ( PacketFlags flag, bool value ) : void |
Sets the value of the specified flag.
|
protected DataPacket ( int length ) : System | ||
length | int | The length of the packet. |
return | System |
protected GetFlag ( PacketFlags flag ) : bool | ||
flag | PacketFlags | |
return | bool |
public Read ( byte buffer, int index, int count ) : int | ||
buffer | byte | The buffer to read into. |
index | int | The index into the buffer to start placing the read data. |
count | int | The number of bytes to read. |
return | int |
public ReadBits ( int count ) : ulong | ||
count | int | The number of bits to read. |
return | ulong |
public ReadBytes ( int count ) : byte[] | ||
count | int | The number of bytes to read. |
return | byte[] |
protected SetFlag ( PacketFlags flag, bool value ) : void | ||
flag | PacketFlags | |
value | bool | |
return | void |
public SkipBits ( int count ) : void | ||
count | int | The number of bits to advance. |
return | void |
public SkipBytes ( int count ) : void | ||
count | int | The number of bytes to advance. |
return | void |
public TryPeekBits ( int count, int &bitsRead ) : ulong | ||
count | int | The number of bits to attempt to read. |
bitsRead | int | The number of bits actually read. |
return | ulong |