Next: , Previous: , Up: Server functions   [Contents][Index] Server loop

This section describes the main server loop functionality. There two modes of operation. The default mode as used in Serveez is to jump into the loop and wait until the core library drops out of it. In the other mode, the caller tells the Serveez core library to scan (and process) its socket chain once and return immediately. Thus, caller is able to issue additional functionality in between each pass, useful if such functionality cannot be handled within the timers (notifiers) of servers and sockets.

Function: void svz_loop_pre (void)

Initialize top-of-cycle state.

Call this function once before using svz_loop_one.

Function: void svz_loop_post (void)

Clean up bottom-of-cycle state.

Call this function once after using svz_loop_one.

Function: void svz_loop (void)

Loop, serving. In other words, handle all signals, incoming and outgoing connections and listening server sockets.

Function: void svz_loop_one (void)

Handle all things once.

This function is called regularly by svz_loop.