Requesting Information

Get Statistics


Retrieve the statistics table for a connection.

#include "laygo.h"

LResult lgo_GetStatistics
        LCid           cid,
        LCtlBuffer     buffer,
        LBufferSize    size
cidconnection to get statistics from
bufferbuffer to hold the returned statistics
sizesize 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.

Return Values

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:

See Also


size = lgo_GetStatistics(cid, buffer, bufCapacity);

if (size > 0)
    statStrings = lgo_StatisticMessages(lgo_Protocol(cid));
    /* display statistics here */