Guitar
Classes | Macros | Typedefs | Functions
webclient.cpp File Reference
#include "webclient.h"
#include <cstring>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <net/if.h>
#include <netdb.h>
#include <openssl/crypto.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/x509v3.h>
#include <set>
#include <cassert>
#include "common/base64.h"
Include dependency graph for webclient.cpp:

Classes

struct  WebContext::Private
 
struct  WebClient::Private
 
class  ResponseHeader
 

Macros

#define closesocket(S)   ::close(S)
 
#define INVALID_SOCKET   (-1)
 
#define SOCKET_ERROR   (-1)
 
#define USER_AGENT   "Generic Web Client"
 

Typedefs

using socket_t = int
 

Functions

static std::string to_s (size_t n)
 
static void send_ (socket_t s, char const *ptr, int len)
 
static char * stristr (char *str1, char const *str2)
 
static int inet_connect (std::string const &hostname, int port)
 
bool decode_chunked (char const *ptr, char const *end, std::vector< char > *out)
 

Macro Definition Documentation

◆ closesocket

#define closesocket (   S)    ::close(S)

◆ INVALID_SOCKET

#define INVALID_SOCKET   (-1)

◆ SOCKET_ERROR

#define SOCKET_ERROR   (-1)

◆ USER_AGENT

#define USER_AGENT   "Generic Web Client"

Typedef Documentation

◆ socket_t

using socket_t = int

Function Documentation

◆ decode_chunked()

bool decode_chunked ( char const *  ptr,
char const *  end,
std::vector< char > *  out 
)

◆ inet_connect()

static int inet_connect ( std::string const &  hostname,
int  port 
)
static

◆ send_()

static void send_ ( socket_t  s,
char const *  ptr,
int  len 
)
static

◆ stristr()

static char* stristr ( char *  str1,
char const *  str2 
)
static

◆ to_s()

static std::string to_s ( size_t  n)
inlinestatic