Template Class connection

Nested Relationships

Inheritance Relationships

Base Type

  • public std::enable_shared_from_this< connection< RouterT, AttachmentT > >

Class Documentation

template<typename RouterT, typename AttachmentT>
class udho::connection : public std::enable_shared_from_this<connection<RouterT, AttachmentT>>

Stateful HTTP Session

Public Functions

connection(RouterT &router, attachment_type &attachment, socket_type socket)

session constructor

Parameters
  • router: router

  • socket: TCP socket

~connection()
void run()

start the read loop

void do_read()
void on_read(boost::system::error_code ec, std::size_t bytes_transferred)
void on_write(boost::system::error_code, std::size_t bytes_transferred, bool close)
void do_close()
void respond(udho::defs::response_type &msg)