UDT Reference: UDT Functions

perfmon

The perfmon method retrieves the internal protocol parameters and performance trace.

int perfmon(

   UDTSOCKET u,

   TRACEINFO* perf,

   bool clear = true
);

Parameters

u
[in] The socket descriptor of an UDT entity.
trace
[out] Pointer to the structure to store the performance trace information.
clear
[in] Flag to indicates if the local traces should be cleared. "true" will clear the trace and restart the count.

Return Values

On success, 0 is returned; Otherwise, UDT::ERROR is returned and the specific error information can be retrieved by getlasterror.

Error Code Comment

2001

connection was broken.

5004

u is an invalid UDT socket.

5005

u is not connected.

Description

perfmon reads the the performance data since last time perfmon is executed, or since the connection start time for the first perfmon call. The result is written in the perf structure.

perfmon may have slightly negative effect on the performance, so it is recommended not to enable this function in productivity applications.