LibHTTP API Reference

December 13, 2016 ยท View on GitHub

httplib_printf( conn, fmt, ... );

Parameters

ParameterTypeDescription
connstruct httplib_connection *The connection over which the data must be sent
fmtconst char *Format string
...variousParameters as specified in the format string

Return Value

TypeDescription
intNumber of bytes written or an error code

Description

The function httplib_printf() can be used to send formatted strings over a connection. The functionality is comparable to the printf() family of functions in the standard C library. The function returns 0 when the connection has been closed, -1 if an error occurred and otherwise the number of bytes written over the connection. Except for the formatting part, the httplib_printf() function is identical to the function httplib_write().

See Also