Microsoft.Data.SqlClient.Packet
Contains a buffer for a partial or full packet and methods to get information about the status of
the packet that the buffer represents.
This class is used to contain partial packet data and helps ensure that the packet data is completely
received before a full packet is made available to the rest of the library
A byte array containing CurrentLength bytes of data
returns a boolean value indicating whether the Buffer contains enough
data for a valid tds header, has a DataLength set and that the
CurrentLength is greater than or equal to the DataLength + tds header length.
The total count of bytes currently in the Buffer array including the tds header bytes
If the packet data has enough bytes available to determine the amount of data that should be present
in the packet then this property will be set to the count of data bytes in the packet,
otherwise this will be -1
returns a boolean value indicating if the DataLength value has been set.
returns a boolean value indicating if there are enough total bytes available in the Buffer to read the tds header
If the packet data has enough bytes available to determine the length amount of data that should be present
in the packet then this property will return the count of data bytes that are expected to be in the packet.
If there are not enough bytes to determine the data byte count then this property will throw an exception.
Call HasDataLength to check if there will be a value before using this property.
public Packet()