|
Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
|
Start with a supplied project that matches your product and the task you want to perform. Use its build instructions and matching SDK resources. The SDK example setup describes the common build environment for the native examples.
| Task | Project and instructions | Result to look for |
|---|---|---|
| Learn server startup and request handlers | CSP introduction, examples/introduction | Browse the HTTP port selected by the startup helper; see Start a native web server for debug defaults and fallback ports. |
| Serve and manage resources | Resource manager, examples/HttpResMgr | Work with files through the server's virtual file system. |
| Protect routes | Authentication example, examples/security | Exercise the example's user database and access-control rules. |
| Receive firmware uploads | Firmware upload, examples/UploadFirmware | Follow the supplied upload workflow and adapt its storage callback to your product. |
| Expose a WebDAV filesystem | WebDAV example, examples/WebDAV | Access the configured filesystem with a WebDAV client. |
| Exchange browser WebSocket frames | examples/WebSocket-Chat/README.txt and the WebSockets API guide | Start the built server, open two browser windows, and exchange text or supported JPEG payloads. |
| Read a ZIP or compiled CSP resource | examples/FileReader/FileZipReader.h and FileCspReader.h | Adapt the reader callback for your backing storage; see CspReader example code.. |
| Manage an HTTPS device certificate | SharkTrustX example and SharkTrustX C Client | Complete registration and certificate installation with the configured service. |
These examples use the native APIs. Required plugins and source selection vary by project; check Configure BAS and BWS for Your Product when adapting them to a BWS build. Sample credentials, certificates, storage callbacks, and network settings must be replaced with your application's configuration.
The Advanced Lua Bindings guide includes its C and Lua examples and explains their object lifetime and mutex rules. The supplied source files include:
| Source | Purpose |
|---|---|
doc/en/C/examples/Lua2C.c | Expose a native object through Lua userdata. |
doc/en/C/examples/LuaCmdEnv2C.c | Connect a Lua command environment to native code. |
examples/xedge/src/led.c | Register a small device binding in an Xedge host. |
examples/xedge/src/AsynchLua.c | Queue events from native code and invoke Lua through LThreadMgr. |
Use the guide and the host's build instructions to compile these sources. They are integration examples, not independent executables.
Use the Mako source build guide and Mako Server: Win32 and x64 builds. The project includes the native host and resource build steps. Try Mako PSA Mode on Windows adds the Windows PSA provider workflow. See Mako Server for host-specific configuration.
Use the standalone Xedge build guide for source files, generated resources, and target hooks. Try Standalone Xedge PSA on Windows provides the Windows PSA workflow. See Standalone Xedge for native integration; Xedge running inside Mako uses the Mako host instead.