|
int | afdt_sync_client (const char *fname, const uint8_t *request, uint32_t request_length, uint8_t *response, uint32_t *response_length, int *received_fd, const struct timeval *timeout, struct afdt_error_t *err) |
| Request a file descriptor from a server. More...
|
|
The synchronous interface provides a very simple function allowing clients to communicate with servers using the asynchronous interface. The function is blocking, but supports an optional timeout.
int afdt_sync_client |
( |
const char * |
fname, |
|
|
const uint8_t * |
request, |
|
|
uint32_t |
request_length, |
|
|
uint8_t * |
response, |
|
|
uint32_t * |
response_length, |
|
|
int * |
received_fd, |
|
|
const struct timeval * |
timeout, |
|
|
struct afdt_error_t * |
err |
|
) |
| |
Request a file descriptor from a server.
- Parameters
-
fname | File to connect PF_LOCAL socket to. |
request | Request buffer to send. |
request_length | Length of request. |
response | Buffer for response. |
response_length | Pointer to response length, returns with actual length. |
received_fd | Returns with received fd, or <0 if none. |
timeout | Timeout when waiting for response, or NULL . |
err | Structure to populate with error information. |
- Returns
- >=0 if successful, <0 on failure.