A buffer with configurable front padding More...
Inherited by NobleConnect.PoolBuffer.
Public Member Functions | |
PaddedBuffer (ArraySegment< byte > buffer, int frontPadding) | |
Public Attributes | |
int | frontPadding |
Protected Attributes | |
ArraySegment< byte > | buffer |
Properties | |
virtual int | Offset [get] |
virtual int | Count [get] |
virtual int | PaddedCount [get] |
virtual int | UnpaddedOffset [get] |
virtual byte[] | Array [get] |
A buffer with configurable front padding
Offset starts after front padding. Use UnpaddedOffset to the get "real" starting index. Count excludes the padding. Use PaddedCount to get the "real" size of the buffer. This is used when receiving on a socket so that we can receiving starting at the padded offset, prepend a channel message header, and then send starting at the "real" offset. This avoids the need copy the incoming data to a new buffer in order to prepend the channel message header.
NobleConnect.PaddedBuffer.PaddedBuffer | ( | ArraySegment< byte > | buffer, |
int | frontPadding | ||
) |
|
protected |
int NobleConnect.PaddedBuffer.frontPadding |
|
get |
|
get |
|
get |
|
get |
|
get |