#include "test.h"
#include <fcntl.h>
#include "testutil.h"
#include "warnless.h"
#include "memdebug.h"
Go to the source code of this file.
|
static void | addFd (struct Sockets *sockets, curl_socket_t fd, const char *what) |
| Add a file descriptor to a sockets array. More...
|
|
static void | checkFdSet (CURLM *curl, struct Sockets *sockets, fd_set *fdset, int evBitmask, const char *name) |
| Invoke curl when a file descriptor is set. More...
|
|
static int | checkForCompletion (CURLM *curl, int *success) |
| Check for curl completion. More...
|
|
static int | curlSocketCallback (CURL *easy, curl_socket_t s, int action, void *userp, void *socketp) |
| Callback invoked by curl to poll reading / writing of a socket. More...
|
|
static int | curlTimerCallback (CURLM *multi, long timeout_ms, void *userp) |
| Callback invoked by curl to set a timeout. More...
|
|
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) |
| Remove a file descriptor from a sockets array. More...
|
|
int | test (char *URL) |
|
static void | updateFdSet (struct Sockets *sockets, fd_set *fdset, curl_socket_t *maxFd) |
| Update a fd_set with all of the sockets in use. More...
|
|
◆ TEST_HANG_TIMEOUT
#define TEST_HANG_TIMEOUT 60 * 1000 |
◆ addFd()
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.
◆ checkFdSet()
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.
◆ checkForCompletion()
static int checkForCompletion |
( |
CURLM * |
curl, |
|
|
int * |
success |
|
) |
| |
|
static |
Check for curl completion.
Definition at line 148 of file lib582.c.
◆ curlSocketCallback()
static int curlSocketCallback |
( |
CURL * |
easy, |
|
|
curl_socket_t |
s, |
|
|
int |
action, |
|
|
void * |
userp, |
|
|
void * |
socketp |
|
) |
| |
|
static |
Callback invoked by curl to poll reading / writing of a socket.
Definition at line 105 of file lib582.c.
◆ curlTimerCallback()
static int curlTimerCallback |
( |
CURLM * |
multi, |
|
|
long |
timeout_ms, |
|
|
void * |
userp |
|
) |
| |
|
static |
Callback invoked by curl to set a timeout.
Definition at line 130 of file lib582.c.
◆ getMicroSecondTimeout()
static int getMicroSecondTimeout |
( |
struct timeval * |
timeout | ) |
|
|
static |
◆ notifyCurl()
static void notifyCurl |
( |
CURLM * |
curl, |
|
|
curl_socket_t |
s, |
|
|
int |
evBitmask, |
|
|
const char * |
info |
|
) |
| |
|
static |
◆ removeFd()
Remove a file descriptor from a sockets array.
Definition at line 47 of file lib582.c.
◆ test()
◆ updateFdSet()
Update a fd_set with all of the sockets in use.
Definition at line 188 of file lib582.c.