메소드 | 설명 | |
---|---|---|
AddPartialPacket ( int packetBytes, byte partialPacket ) : void |
Add a partial packet to the end of the cache by reference.
|
|
ClearNTopBytes ( int numBytesToRemove ) : void |
Clear N bytes from cache, starting with oldest bytes first.
|
|
FirstByte ( ) : byte |
Returns the value of the first cached byte.
|
|
GetAllData ( ) : byte[] |
Copies all cached bytes into a single array and returns. Original data is left unchanged.
|
|
NumUnusedBytesMostRecentPartialPacket ( ) : int |
Returns the number of unused bytes in the most recently cached partial packet.
|
|
PacketBuilder ( ) : System |
Create a new instance of the ConnectionPacketBuilder class
|
|
ReadDataSection ( int startIndex, int length ) : |
Copies the requested cached bytes into a single array and returns. Original data is left unchanged.
|
|
RemoveMostRecentPartialPacket ( int &lastPacketBytesRead ) : byte[] |
Returns the most recently cached partial packet and removes it from the cache. Used to more efficiently utilise allocated memory space.
|
public AddPartialPacket ( int packetBytes, byte partialPacket ) : void | ||
packetBytes | int | The number of valid bytes in the provided partial packet |
partialPacket | byte | A buffer which may or may not be full with valid bytes |
리턴 | void |
public ClearNTopBytes ( int numBytesToRemove ) : void | ||
numBytesToRemove | int | The total number of bytes to be removed. |
리턴 | void |
public NumUnusedBytesMostRecentPartialPacket ( ) : int | ||
리턴 | int |
public ReadDataSection ( int startIndex, int length ) : |
||
startIndex | int | The inclusive byte index to use as the starting position. |
length | int | The total number of desired bytes. |
리턴 |
public RemoveMostRecentPartialPacket ( int &lastPacketBytesRead ) : byte[] | ||
lastPacketBytesRead | int | The number of valid bytes in the last partial packet added |
리턴 | byte[] |