rohdeschwarz  0.2.0
TCPIP socket library for Rohde & Schwarz instrument control
helpers.cpp
Go to the documentation of this file.
1 
7 // rohdeschwarz
9 // using namespace rohdeschwarz::busses::socket;
10 
11 
12 // implementation
13 
14 boost::asio::ip::basic_resolver<boost::asio::ip::tcp>::results_type
16 (
17  const std::string &host,
18  int port,
19  boost::asio::io_context& io_context
20 )
21 {
22  // get port string
23  std::string port_str = std::to_string(port);
24 
25  // resolve endpoint(s)
26  boost::asio::ip::tcp::resolver resolver(io_context);
27  return resolver.resolve(host.c_str(), port_str.c_str());
28 }
rohdeschwarz::busses::socket helper function definitions
boost::asio::ip::basic_resolver< boost::asio::ip::tcp >::results_type resolve(const std::string &host, int port, boost::asio::io_context &io_context)
Resolves TCP IP endpoint(s) from host, port.
Definition: helpers.cpp:16