Jpp  17.1.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
recipients_handler.cc File Reference
#include "recipients_handler.hh"
#include <boost/lexical_cast.hpp>

Go to the source code of this file.

Functions

boost::asio::ip::tcp::endpoint make_endpoint (const std::string &address)
 

Function Documentation

boost::asio::ip::tcp::endpoint make_endpoint ( const std::string &  address)
Author
cpellegrino

Definition at line 9 of file recipients_handler.cc.

10 {
11  const size_t pos = address.find(":");
12  const std::string ip = address.substr(0, pos);
13  const unsigned short port = boost::lexical_cast<unsigned int>(address.substr(pos + 1));
14 
15  return boost::asio::ip::tcp::endpoint(
16  boost::asio::ip::address::from_string(ip),
17  port);
18 }