adds documentation and adaptors for connection::close

This commit is contained in:
Peter Thorson
2013-02-01 07:41:04 -06:00
parent b999051959
commit d0cbb07d5c
2 changed files with 33 additions and 0 deletions

View File

@@ -160,6 +160,26 @@ void endpoint<connection,config>::send(connection_hdl hdl, message_ptr msg) {
if (ec) { throw ec; }
}
template <typename connection, typename config>
void endpoint<connection,config>::close(connection_hdl hdl,
const close::status::value code, const std::string & reason,
lib::error_code & ec)
{
connection_ptr con = get_con_from_hdl(hdl,ec);
if (ec) {return;}
ec = con->close(code,reason);
}
template <typename connection, typename config>
void endpoint<connection,config>::close(connection_hdl hdl,
const close::status::value code, const std::string & reason)
{
lib::error_code ec;
send(hdl,code,reason,ec);
if (ec) { throw ec; }
}
template <typename connection, typename config>
void endpoint<connection,config>::remove_connection(connection_ptr con) {
std::stringstream s;