ui-utilcpp
1.8.3
|
Public Member Functions | |
Connection (std::iostream &stream) | |
Connection (int fd, bool closeFd=false, long int rcvToSeconds=0, long int rcvToMicroseconds=0, long int sndToSeconds=0, long int sndToMicroseconds=0, bool noBlock=false) | |
Connection (std::string const &host, unsigned int port, long int rcvToSeconds=0, long int rcvToMicroseconds=0, long int sndToSeconds=0, long int sndToMicroseconds=0, bool noBlock=false) | |
Connection (std::string const &path, long int rcvToSeconds=0, long int rcvToMicroseconds=0, long int sndToSeconds=0, long int sndToMicroseconds=0, bool noBlock=false) | |
Get socket information. | |
std::string | getId () const |
std::string | getPeerId () const |
std::string | getConnId () const |
Get stream for arbitrary use. | |
std::iostream const & | s () const |
std::iostream & | s () |
Read utilities. | |
std::string | readLine () |
std::streamsize | readBlock (std::string &block, std::streamsize const &size, bool doThrow=true) |
std::string | readBlock (std::streamsize const &size) |
std::vector< char > | readBlockVec (std::streamsize const &size) |
Header & | readHeader (Header &header) |
Header | readHeader () |
Write utilities. | |
Connection & | writeLine (std::string const &line="") |
Connection & | write (std::string const &block) |
Connection & | write (StatusLine const &statusLine) |
Connection & | write (RequestLine const &requestLine) |
Connection & | write (HeaderField const &oHeaderField, std::string const &prefix="") |
Connection & | write (Header const &header, std::string const &prefix="") |
A simple "default" http request. | |
std::string | simpleHttpRequest (std::string const &body) |
UI::Util::Http::Connection::Connection | ( | std::iostream & | stream | ) |
Connection w/ an existing stream.
UI::Util::Http::Connection::Connection | ( | int | fd, |
bool | closeFd = false , |
||
long int | rcvToSeconds = 0 , |
||
long int | rcvToMicroseconds = 0 , |
||
long int | sndToSeconds = 0 , |
||
long int | sndToMicroseconds = 0 , |
||
bool | noBlock = false |
||
) |
Connection w/ an open (socket) file descriptor.
UI::Util::Http::Connection::Connection | ( | std::string const & | host, |
unsigned int | port, | ||
long int | rcvToSeconds = 0 , |
||
long int | rcvToMicroseconds = 0 , |
||
long int | sndToSeconds = 0 , |
||
long int | sndToMicroseconds = 0 , |
||
bool | noBlock = false |
||
) |
Connection w/ an INet peer.
UI::Util::Http::Connection::Connection | ( | std::string const & | path, |
long int | rcvToSeconds = 0 , |
||
long int | rcvToMicroseconds = 0 , |
||
long int | sndToSeconds = 0 , |
||
long int | sndToMicroseconds = 0 , |
||
bool | noBlock = false |
||
) |
Connection w/ an UNIX peer.