Requesting Information
lgo_GetStatistics()
Retrieve the statistics table for a connection.
#include "laygo.h"
LResult lgo_GetStatistics
(
LCid cid,
LCtlBuffer buffer,
LBufferSize size
);
| cid | connection to get statistics from |
| buffer | buffer to hold the returned statistics |
| size | size of buffer in bytes |
lgo_GetStatistics() retrieves the statistics
table for a connection, if one exists. If the call to lgo_GetStatistics()
is successful, the contents of the control buffer passed to the
function may be cast to type LStatisticsTable as defined in laygodef.h.
If successful, lgo_GetStatistics() returns a non-negative value indicating the number of bytes returned into the buffer. A return value of 0 means that there is no statistics table for the connection. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
size = lgo_GetStatistics(cid, buffer, bufCapacity);
if (size > 0)
{
statStrings = lgo_StatisticMessages(lgo_Protocol(cid));
/* display statistics here */
lgo_ClearStatistics(cid);
}