Sambar Server API Reference

This document, the Sambar Server API Reference, contains information on how to write server-side applications using the Sambar Server Application Programming Interface (API).

Audience

The Sambar Server API Reference is written for programmers familiar with the C or C++ programming languages, as well as HTTP (for example, CERN, NCSA, or Netscape) servers.

Public Header File

The sambar.h file must be included in any DLL used by the Sambar Server.

Thread-safe APIs

The Sambar Server has a multithreaded architecture, with the server acting as a collection of threads, each executing functions to accomplish its specific task(s). With the exception of sa_conn_send and sa_send_file, all Sambar Server APIs are thread-safe (these APIs are re-entrant, allowing them to be called simultaneously for unique client connections). This means that the server can simultaneously support multiple applications - all calling the same APIs - and maintain the integrity of each application's context. Each client connection has its own thread to manage the connection and to execute the event handlers and remote procedure calls that fulfill its requests. This places a burden on the software developer to ensure that all RPCs and event handlers (except INIT and EXIT) are thread-aware.