next up previous contents
Next: Service routines Up: Server Previous: Connection control   Contents

Handlers

The handlers are functions that are responsible for specific operations in the application. A handler could be invoked as a result of an event in the ICQ network or as a result of a user request. The handlers are implemented in the files:

The description above gives a very intuitive separation of handlers into two basic groups:

ICQ handlers
are handlers (also referred to as ``callbacks'') invoked by events in the ICQ network. In fact, they are being called by the icq_Main() function. Please refer to the icqlib manual for more information on callbacks.

The convention in the code is to name these handlers icq_handle_$x$ where $x$ is the event to be handled.

The callbacks implemented in the current version of csicq are:

User handlers
are invoked as a response to an event on the user connection. The user sends a message using our protocol, it is being received and then interpreted by the handle_message function (which is not really a handler but rather a dispatcher of messages to handlers). The function determines according to the message type which user handler should be invoked and activates it. The naming convention for these handlers is handle_$x$ where $x$ is the event to be handled.

The handlers implemented in the current version of csicq are:


next up previous contents
Next: Service routines Up: Server Previous: Connection control   Contents
Zvika Brakerski 2001-05-09