Class QosResponse
Syntax
Fields
MaxPacketLen
Declaration
public const int MaxPacketLen = 1500
Field Value
MinPacketLen
Declaration
public const int MinPacketLen = 13
Field Value
ResponseMagic
Declaration
public const byte ResponseMagic = 149
Field Value
ResponseVersion
Declaration
public const byte ResponseVersion = 0
Field Value
Properties
FlowControl
Declaration
public byte FlowControl { get; }
Property Value
Identifier
Declaration
public ushort Identifier { get; }
Property Value
LatencyMs
Declaration
public int LatencyMs { get; }
Property Value
Length
Declaration
public ushort Length { get; }
Property Value
Magic
Declaration
public byte Magic { get; }
Property Value
Sequence
Declaration
public byte Sequence { get; }
Property Value
Timestamp
Declaration
public ulong Timestamp { get; }
Property Value
Version
Declaration
public byte Version { get; }
Property Value
Methods
ParseFlowControl()
Parses the FlowControl 4-bit value into the type and number of units (duration) that have been applied.
Declaration
public (FcType type, byte units) ParseFlowControl()
Returns
Type |
Description |
ValueTuple<FcType, Byte> |
(type, units) where type is the flow control type (FcType.None for no flow control), and units is the
number of units of that type of flow control that the server has applied (and we should adhere to).
|
Recv(Int64, Boolean, DateTime, ref NetworkInterfaceEndPoint)
Receive a QosResponse if one is available
Declaration
public (int received, int errorcode) Recv(long socket, bool wait, DateTime expireTimeUtc, ref NetworkInterfaceEndPoint endPoint)
Parameters
Type |
Name |
Description |
Int64 |
socket |
Native socket descriptor
|
Boolean |
wait |
|
DateTime |
expireTimeUtc |
When to stop waiting for a response
|
NetworkInterfaceEndPoint |
endPoint |
|
Returns
Type |
Description |
ValueTuple<Int32, Int32> |
(received, errorcode) where received is the number of bytes received and errorcode is the error code if any.
0 means no error.
|
Verify(UInt32, ref String)
Verifies the QosResponse contains valid required fields
Declaration
public bool Verify(uint maxSequence, ref string error)
Parameters
Type |
Name |
Description |
UInt32 |
maxSequence |
|
String |
error |
Contains the description of the first validation failure if valiation failed
|
Returns
Type |
Description |
Boolean |
true if basic validation passes, false otherwise
|