NetSocket++
0.1
A library designed to simplify working with UNIX sockets in C++, written in OOP methodology.
|
A class representing HTTP client socket. More...
#include <HTTPClientSocket.h>
Public Member Functions | |
HTTPClientSocket (std::string host, std::string service, std::string docRequest) | |
A constructor with parameters. More... | |
HTTPReply | getReply () |
A function returning a HTTPReply. More... | |
std::string | getRequest () |
A function returning the request used in the socket. More... | |
Public Member Functions inherited from NetSocketPP::ClientSocket | |
ClientSocket (std::string host, std::string service, std::string protocol) | |
A constructor with parameters, that creates and connects the socket. More... | |
int | send (std::string msg, int flags) |
A function, that sends data through the socket. More... | |
int | recv (int flags) |
A function, that receives data through the socket. More... | |
std::string | get () |
A function returning recently recv-d data. More... | |
Public Member Functions inherited from NetSocketPP::NetSocket | |
NetSocket (std::string host, std::string service, std::string protocol) | |
A constructor with parameters, that creates a socket. More... | |
std::string | getIP () |
A function that returns IP of a host. More... | |
int | getDesc () |
A function that returns socket descriptor. More... | |
~NetSocket () | |
A destructor, that frees the memory. | |
Additional Inherited Members | |
Protected Member Functions inherited from NetSocketPP::NetSocket | |
void * | get_in_addr (sockaddr *sa) |
Needed for implementation purposes. | |
Protected Attributes inherited from NetSocketPP::ClientSocket | |
char | buf [100000] |
A large buffer for data. | |
A class representing HTTP client socket.
HTTPClientSocket::HTTPClientSocket | ( | std::string | host = NULL , |
std::string | service = "http" , |
||
std::string | docRequest = "/" |
||
) |
A constructor with parameters.
host | Hostname or IP of socket destination, defaults to NULL. |
service | Service port or identifier, defaults to HTTP. |
docRequest | A document to request from the server, defaults to root/index (/). |
HTTPReply HTTPClientSocket::getReply | ( | ) |
std::string HTTPClientSocket::getRequest | ( | ) |
A function returning the request used in the socket.