Apache Mesos
|
Represents a connection to an HTTP server. More...
#include <http.hpp>
Public Member Functions | |
Connection ()=delete | |
Future< Response > | send (const Request &request, bool streamedResponse=false) |
Sends a request to the server. More... | |
Future< Nothing > | disconnect () |
Disconnects from the server. More... | |
Future< Nothing > | disconnected () |
Returns a future that is satisfied when a disconnection occurs. More... | |
bool | operator== (const Connection &c) const |
bool | operator!= (const Connection &c) const |
Public Attributes | |
const network::Address | localAddress |
const network::Address | peerAddress |
Friends | |
Future< Connection > | connect (const network::Address &address, Scheme scheme, const Option< std::string > &peer_hostname) |
Future< Connection > | connect (const URL &) |
Represents a connection to an HTTP server.
Pipelining will be used when there are multiple requests in-flight.
TODO(bmahler): This does not prevent pipelining with HTTP/1.0.
|
delete |
Returns a future that is satisfied when a disconnection occurs.
|
inline |
|
inline |
Future<Response> process::http::Connection::send | ( | const Request & | request, |
bool | streamedResponse = false |
||
) |
Sends a request to the server.
If there are additional requests in flight, pipelining will occur. If 'streamedResponse' is set, the response body will be of type 'PIPE'. Note that if the request or response has a 'Connection: close' header, the connection will close after the response completes.
|
friend |
|
friend |
const network::Address process::http::Connection::localAddress |
const network::Address process::http::Connection::peerAddress |