Message.PeekBits Method
Namespace: Riptide
Assembly: RiptideNetworking.dll
Overloads
PeekBits(int, int, out byte) | Retrieves up to 8 bits from the specified position in the message. |
PeekBits(int, int, out ushort) | Retrieves up to 16 bits from the specified position in the message. |
PeekBits(int, int, out uint) | Retrieves up to 32 bits from the specified position in the message. |
PeekBits(int, int, out ulong) | Retrieves up to 64 bits from the specified position in the message. |
PeekBits(int, int, out byte)
Retrieves up to 8 bits from the specified position in the message.
public Message PeekBits(int amount, int startBit, out byte bitfield)
Parameters
int | amount |
The number of bits to peek. |
int | startBit |
The bit position in the message at which to start peeking. |
byte | bitfield |
The bits that were retrieved. |
Returns
Message | The message instance. |
Remarks
This method can be used to retrieve a range of bits from anywhere in the message without moving its internal read position.
PeekBits(int, int, out ushort)
Retrieves up to 16 bits from the specified position in the message.
public Message PeekBits(int amount, int startBit, out ushort bitfield)
Parameters
int | amount |
The number of bits to peek. |
int | startBit |
The bit position in the message at which to start peeking. |
ushort | bitfield |
The bits that were retrieved. |
Returns
Message | The message instance. |
Remarks
This method can be used to retrieve a range of bits from anywhere in the message without moving its internal read position.
PeekBits(int, int, out uint)
Retrieves up to 32 bits from the specified position in the message.
public Message PeekBits(int amount, int startBit, out uint bitfield)
Parameters
int | amount |
The number of bits to peek. |
int | startBit |
The bit position in the message at which to start peeking. |
uint | bitfield |
The bits that were retrieved. |
Returns
Message | The message instance. |
Remarks
This method can be used to retrieve a range of bits from anywhere in the message without moving its internal read position.
PeekBits(int, int, out ulong)
Retrieves up to 64 bits from the specified position in the message.
public Message PeekBits(int amount, int startBit, out ulong bitfield)
Parameters
int | amount |
The number of bits to peek. |
int | startBit |
The bit position in the message at which to start peeking. |
ulong | bitfield |
The bits that were retrieved. |
Returns
Message | The message instance. |
Remarks
This method can be used to retrieve a range of bits from anywhere in the message without moving its internal read position.