Apache Mesos
Public Member Functions | Public Attributes | Friends | List of all members
process::http::Connection Class Reference

Represents a connection to an HTTP server. More...

#include <http.hpp>

Public Member Functions

 Connection ()=delete
Future< Responsesend (const Request &request, bool streamedResponse=false)
 Sends a request to the server. More...
Future< Nothingdisconnect ()
 Disconnects from the server. More...
Future< Nothingdisconnected ()
 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


Future< Connectionconnect (const network::Address &address, Scheme scheme, const Option< std::string > &peer_hostname)
Future< Connectionconnect (const URL &)

Detailed Description

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.

Constructor & Destructor Documentation

process::http::Connection::Connection ( )

Member Function Documentation

Future<Nothing> process::http::Connection::disconnect ( )

Disconnects from the server.

Future<Nothing> process::http::Connection::disconnected ( )

Returns a future that is satisfied when a disconnection occurs.

bool process::http::Connection::operator!= ( const Connection c) const
bool process::http::Connection::operator== ( const Connection c) const
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.

Friends And Related Function Documentation

Future<Connection> connect ( const network::Address address,
Scheme  scheme,
const Option< std::string > &  peer_hostname 
Future<Connection> connect ( const URL )

Member Data Documentation

const network::Address process::http::Connection::localAddress
const network::Address process::http::Connection::peerAddress

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