#include "recipient.hh"
#include <string>
#include <vector>
#include <boost/asio.hpp>
Go to the source code of this file.
|
boost::asio::ip::tcp::endpoint | make_endpoint (const std::string &address) |
|
◆ make_endpoint()
boost::asio::ip::tcp::endpoint make_endpoint |
( |
const std::string & | address | ) |
|
|
inline |
- 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}