Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
Start here

Build an embedded web interface, expose a native service, or connect your C/C++ code to Lua. This reference covers the native APIs shared by the Barracuda Web Server (BWS) and Barracuda App Server (BAS), the BAS Lua integration APIs, and the native hosts used by Mako Server and standalone Xedge.

Choose your integration

Your application Start with What you will assemble
Native C or C++ web server Start a native web server BWS server, dispatcher, listener, and request handlers
Your own host embedding Lua Lua embedding and bindings BAS, a Lua VM, its resources, and your bindings
Mako Server customization Mako Server The Mako host and its selected BAS modules
Standalone Xedge firmware Standalone Xedge The Xedge host, Lua resources, and hardware integration

BWS supplies the native web-server library. BAS adds Lua and Lua Server Pages (LSP). Mako and standalone Xedge are hosts built on BAS. Their build and startup choices are not interchangeable; use Configure BAS and BWS for Your Product to check an option's scope.

Reading the C and C++ APIs

The library is written in C with C++ wrappers. An object is a C structure, and a C method normally takes the object pointer first. For example, HttpRequest_getParameter(request, "name") corresponds to request->getParameter("name") in C++. Read the C/C++ mapping guide before using the type index. Structure fields are private implementation storage unless explicitly documented as application interfaces.

Find the next task

Task Guide API starting point
Start a native server and route a URL Start a native web server HttpServer, HttpDir, HttpPage
Select features or size the HTTP pools Configuration and ports BaConfig.h, HttpServerConfig
Serve files from disk, ZIP, or another server Native HTTP and filesystems Filesystems and I/O, HttpResRdr
Exchange JSON or use WebSockets JSON and UBJSON JSON and UBJSON, WebSockets
Authenticate users or configure HTTPS Security and certificates Authentication and authorization, HttpSharkSslServCon
Call Lua from native code Lua embedding and bindings Lua embedding and bindings, LThreadMgr
Build a supplied host or start from an example Native integration examples Mako Server, Standalone Xedge

Use Integration guides for the guide hierarchy, API by topic for subsystem interfaces, Types for objects and C++ wrappers, and Headers for declarations. Each API contract describes its own ownership, error, and locking requirements.