4 #include "Socket/Socket.h"
5 #include "Socket/Endpoint.h"
6 #include "axTLS/ssl/ssl.h"
7 #include "HTTPHeader.h"
12 class HTTPSClient : public Socket, public Endpoint {
15 /** TCP socket connection
20 virtual ~HTTPSClient();
22 /** Connects this TCP socket to the server
23 \param host The host to connect to. It can either be an IP Address or a hostname that will be resolved with DNS.
24 \param port The host's port to connect to.
25 \return 0 on success, -1 on failure.
27 int connect(const char* host);
29 /** Check if the socket is connected
30 \return true if connected, false otherwise.
32 bool is_connected(void);
34 // Returns the size of the body
35 HTTPHeader get(char *path);
37 int read(char *data, int len);
45 int send(char* data, int length);
48 HTTPHeader read_header();