amarquee.library/QNumQueuedPackets amarquee.library/QNumQueuedPackets
NAME
QNumQueuedPackets - Returns (approximately) the number of messages
awaiting processing by the QSession's TCP thread.
SYNOPSIS
#include
ULONG QNumQueuedPackets(struct QSession * session)
FUNCTION
Returns the number of messages that have been sent to the TCP
thread for this QSession, but have not yet been processed by the
TCP thread. This value includes one point for each transaction
generated by the Q*Op() calls, as well as one point per QGo() call.
No thread synchronization is done, so the value returned should be
considered approximate only. This function can be used to see
if packets are being queued faster than they are being sent, and
thus take corrective action before too much memory is allocated for
queued packets.
INPUTS
session - Pointer to the QSession struct you want information for.
RESULTS
Number of queued messages.
EXAMPLE
struct QSession * s;
if (s = QNewSession("example.server.com", 2957, "ExampleProgram"))
{
ULONG numQueued;
/* ... */
numQueued = QNumQueuedPackets(s);
printf("Currently there are %i packets awaiting transmission\n",numQueued);
/* ... */
QFreeSession(s);
}
SEE ALSO
QNumQueuedBytes
Converted on 24 Mar 2002 with RexxDoesAmigaGuide2HTML 2.1e(private) by Michael Ranner.