UI::Util::Http::Connection Class Reference
Collaboration diagram for UI::Util::Http::Connection:

## 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)

## Constructor & Destructor Documentation

## Connection() [1/4]

UI::Util::Http::Connection::Connection | ( | std::iostream & | stream | ) |

Connection w/ an existing stream.

## Connection() [2/4]

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.

## Connection() [3/4]

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.

## Connection() [4/4]

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.

The documentation for this class was generated from the following files:

- Connection.hpp
- Connection.cpp