FLUSH SPREAD

FL_poll

Section: User Manuals (3)
Updated: Dec 2000

NAME

FL_poll - returns the amount, in bytes, of activity on a connection.

SYNOPSIS

#include <fl.h>

int FL_poll(mailbox mbox);

DESCRIPTION

FL_poll is a way to poll the connection represented by mbox to see if there is any activity on that connection.

NOTE, however that activity does NOT necessarily mean that a message is available to be read, as in Spread. Only a call to FL_more_msgs that returns a positive number of buffered messages or a DONT_BLOCK receive call can check for sure to see if a message is now available to be read. If you don't use either of these semantics, then you may enter into a blocking receive call, which can sometimes be dangerous (see FL_flush).

RETURN VALUES

Returns the number of bytes of activity currently on the connection, or one of the following errors ( < 0 ):
ILLEGAL_SESSION
The connection represented by mbox is illegal, usually because it is not active.

AUTHOR

John Schultz <jschultz@cnds.jhu.edu>