1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-09-01 14:21:56 +03:00

Renamed mg_ docs to httplib_

This commit is contained in:
Lammert Bies
2016-12-13 13:21:21 +01:00
parent 24b23330d6
commit 661d82bd37
52 changed files with 0 additions and 0 deletions

27
doc/api/httplib_printf.md Normal file
View File

@@ -0,0 +1,27 @@
# LibHTTP API Reference
### `httplib_printf( conn, fmt, ... );`
### Parameters
| Parameter | Type | Description |
| :--- | :--- | :--- |
|**`conn`**|`struct httplib_connection *`|The connection over which the data must be sent|
|**`fmt`**|`const char *`|Format string|
|**`...`**|*various*|Parameters as specified in the format string|
### Return Value
| Type | Description |
| :--- | :--- |
|`int`|Number 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()`](httplib_write.md).
### See Also
* [`httplib_websocket_client_write();`](httplib_websocket_client_write.md)
* [`httplib_websocket_write();`](httplib_websocket_write.md)
* [`httplib_write();`](httplib_write.md)