Crow  1.0
A C++ microframework for the web
crow::SocketAdaptor Struct Reference

A wrapper for the asio::ip::tcp::socket and asio::ssl::stream. More...

Collaboration diagram for crow::SocketAdaptor:

Public Types

using context = void
 

Public Member Functions

 SocketAdaptor (boost::asio::io_service &io_service, context *)
 
boost::asio::io_service & get_io_service ()
 
tcp::socket & raw_socket ()
 Get the TCP socket handling data trasfers, regardless of what layer is handling transfers on top of the socket. More...
 
tcp::socket & socket ()
 Get the object handling data transfers, this can be either a TCP socket or an SSL stream (if SSL is enabled). More...
 
tcp::endpoint remote_endpoint ()
 
bool is_open ()
 
void close ()
 
void shutdown_readwrite ()
 
void shutdown_write ()
 
void shutdown_read ()
 
template<typename F >
void start (F f)
 

Public Attributes

tcp::socket socket_
 

Detailed Description

A wrapper for the asio::ip::tcp::socket and asio::ssl::stream.

Member Typedef Documentation

◆ context

Constructor & Destructor Documentation

◆ SocketAdaptor()

crow::SocketAdaptor::SocketAdaptor ( boost::asio::io_service &  io_service,
context  
)
inline

Member Function Documentation

◆ get_io_service()

boost::asio::io_service& crow::SocketAdaptor::get_io_service ( )
inline

◆ raw_socket()

tcp::socket& crow::SocketAdaptor::raw_socket ( )
inline

Get the TCP socket handling data trasfers, regardless of what layer is handling transfers on top of the socket.

◆ socket()

tcp::socket& crow::SocketAdaptor::socket ( )
inline

Get the object handling data transfers, this can be either a TCP socket or an SSL stream (if SSL is enabled).

◆ remote_endpoint()

tcp::endpoint crow::SocketAdaptor::remote_endpoint ( )
inline

◆ is_open()

bool crow::SocketAdaptor::is_open ( )
inline

◆ close()

void crow::SocketAdaptor::close ( )
inline

◆ shutdown_readwrite()

void crow::SocketAdaptor::shutdown_readwrite ( )
inline

◆ shutdown_write()

void crow::SocketAdaptor::shutdown_write ( )
inline

◆ shutdown_read()

void crow::SocketAdaptor::shutdown_read ( )
inline

◆ start()

template<typename F >
void crow::SocketAdaptor::start ( f)
inline

Member Data Documentation

◆ socket_

tcp::socket crow::SocketAdaptor::socket_

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