| synopsis || arguments || prev || next |

kdu_client::install_notifier

void install_notifier( kdu_client_notifier * notifier)

[Declared in "../apps/compressed_io/kdu_client.h"]

Go to class description.


Synopsis

Provides a generic mechanism for the network management thread to notify the application when the connection state changes or when new data is placed in the cache. Specifically, the application provides an appropriate object, derived from the abstract base class, kdu_client_notifier. The object's virtual notify function is called from within the network management thread whenever any of the following conditions occur:

A typical notifier would post a message on an interactive client's message queue so as to wake the application up if necessary. A more intelligent notifier may choose to wake the application up in this way only if a substantial change has occurred in the cache — something which may be determined with the aid of the kdu_cache::get_transferred_bytes function.

The following functions should never be called from within the notifier→notify call, since that call is generated from within the network management thread: connect, close, disconnect and post_window.

We note that the notifier remains installed after its notify function has been called, so there is no need to re-install the notifier. If you wish to remove the notifier, the install_notifier function may be called with a NULL argument.


Arguments

notifier [kdu_client_notifier *]


| top || synopsis || arguments || prev || next |