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

View File

@@ -0,0 +1,29 @@
# LibHTTP API Reference
### `httplib_get_response( conn, ebuf, ebuf_len, timeout );`
### Parameters
| Parameter | Type | Description |
| :--- | :--- | :--- |
|**`conn`**|`struct httplib_connection *`|The connection to listen on|
|**`ebuf`**|`char *`|Buffer to store an error message|
|**`ebuf_len`**|`size_t`|Size of the error message buffer including the terminating NUL|
|**`timeout`**|`int`|Time to wait for a response in milliseconds|
### Return Value
| Type | Description |
| :--- | :--- |
|`int`|Success value of the wait|
### Description
The function `httplib_get_reponse()` wait for a response from a remote server. A return value equal or greater than zero is an indication for success, a negative value us used to signal an error condition. A timeout can be specified which lets the function return after a specified number of milliseconds, even if no data is received from the remote party. If the timeout value is negative, the function will not return until data has been read or an unrecoverable error occurs.
Error messages are stored in a caller supplied error message buffer.
### See Also
* [`httplib_connect_client();`](httplib_connect_client.md)
* [`httplib_connect_client_secure();`](httplib_connect_client_secure.md)