Classes | Macros | Functions
lib582.c File Reference
#include "test.h"
#include <fcntl.h>
#include "testutil.h"
#include "warnless.h"
#include "memdebug.h"
Include dependency graph for lib582.c:

Go to the source code of this file.

Classes

struct  ReadWriteSockets
 
struct  Sockets
 

Macros

#define TEST_HANG_TIMEOUT   60 * 1000
 

Functions

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...
 

Macro Definition Documentation

#define TEST_HANG_TIMEOUT   60 * 1000

Definition at line 30 of file lib582.c.

Function Documentation

static void addFd ( struct Sockets sockets,
curl_socket_t  fd,
const char *  what 
)
static

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.

static int checkForCompletion ( CURLM curl,
int *  success 
)
static

Check for curl completion.

Definition at line 148 of file lib582.c.

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.

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.

static int getMicroSecondTimeout ( struct timeval timeout)
static

Definition at line 172 of file lib582.c.

static void notifyCurl ( CURLM curl,
curl_socket_t  s,
int  evBitmask,
const char *  info 
)
static

Definition at line 200 of file lib582.c.

static void removeFd ( struct Sockets sockets,
curl_socket_t  fd,
int  mention 
)
static

Remove a file descriptor from a sockets array.

Definition at line 47 of file lib582.c.

int test ( char *  URL)

Definition at line 225 of file lib582.c.

static void updateFdSet ( struct Sockets sockets,
fd_set *  fdset,
curl_socket_t maxFd 
)
static

Update a fd_set with all of the sockets in use.

Definition at line 188 of file lib582.c.



rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:17