#include "test.h"
#include <fcntl.h>
#include "testutil.h"
#include "warnless.h"
#include "memdebug.h"
Go to the source code of this file.
Classes |
struct | ReadWriteSockets |
struct | Sockets |
Defines |
#define | TEST_HANG_TIMEOUT 60 * 1000 |
Functions |
static void | addFd (struct Sockets *sockets, curl_socket_t fd, const char *what) |
static void | checkFdSet (CURLM *curl, struct Sockets *sockets, fd_set *fdset, int evBitmask, const char *name) |
static int | checkForCompletion (CURLM *curl, int *success) |
static int | curlSocketCallback (CURL *easy, curl_socket_t s, int action, void *userp, void *socketp) |
static int | curlTimerCallback (CURLM *multi, long timeout_ms, void *userp) |
static int | getMicroSecondTimeout (struct timeval *timeout) |
static void | notifyCurl (CURLM *curl, curl_socket_t s, int evBitmask, const char *info) |
static void | removeFd (struct Sockets *sockets, curl_socket_t fd, int mention) |
int | test (char *URL) |
static void | updateFdSet (struct Sockets *sockets, fd_set *fdset, curl_socket_t *maxFd) |
Define Documentation
Function Documentation
Add a file descriptor to a sockets array.
To ensure we only have each file descriptor once, we remove it then add it again.
Definition at line 67 of file lib582.c.
static void checkFdSet |
( |
CURLM * |
curl, |
|
|
struct Sockets * |
sockets, |
|
|
fd_set * |
fdset, |
|
|
int |
evBitmask, |
|
|
const char * |
name |
|
) |
| [static] |
Invoke curl when a file descriptor is set.
Definition at line 214 of file lib582.c.
Check for curl completion.
Definition at line 148 of file lib582.c.
Callback invoked by curl to poll reading / writing of a socket.
Definition at line 105 of file lib582.c.
Callback invoked by curl to set a timeout.
Definition at line 130 of file lib582.c.
Remove a file descriptor from a sockets array.
Definition at line 47 of file lib582.c.
Update a fd_set with all of the sockets in use.
Definition at line 188 of file lib582.c.