Add a function to return the local endpoint of a http server

This commit is contained in:
Eric Frias 2014-06-03 19:00:22 -04:00
parent 73dd2d68ea
commit 2690a52fe5
2 changed files with 7 additions and 1 deletions

View file

@ -46,6 +46,7 @@ namespace fc { namespace http {
};
void listen( const fc::ip::endpoint& p );
fc::ip::endpoint get_local_endpoint() const;
/**
* Set the callback to be called for every http request made.

View file

@ -96,10 +96,15 @@ namespace fc { namespace http {
server::~server(){}
void server::listen( const fc::ip::endpoint& p ) {
void server::listen( const fc::ip::endpoint& p )
{
my.reset( new impl(p) );
}
fc::ip::endpoint server::get_local_endpoint() const
{
return my->tcp_serv.get_local_endpoint();
}
server::response::response(){}