verse_callback_update

Name

verse_callback_update -- Empty incoming network queue, and call callbacks as necessary

Synopsis

void verse_callback_update( uint32 microseconds );

Description

This function reads any incoming packets from the network, parses them (splits them into commands) and issues calls to any callbacks that are registered for the found commands. It will block for at most microseconds microseconds and wait for something to arrive.

Note

An application must call this function periodically in order to service the connection with the other end of the Verse link; failure to do so will cause the other end's packet buffer to grow monotonically, which in turn might cause the connection to be terminated.

This function really is "the heart" of Verse clients; any client programmer must figure out a way to get his/her client to regularly call this function, to keep the Verse traffic flowing as required.

Any callbacks registered using verse_callback_set() can be called as a result of calling this function, if the corresponding Verse event has happened. Execution of this function is the only time during which callbacks can be called. This means that a client program can rely on the fact that calling some other Verse API function, such as any command-sending function, is guaranteed to not cause a callback to be invoked.