26 #include "client_base.h" 27 #include "goby/util/as.h" 42 TCPClient(
const std::string& server,
unsigned port,
const std::string& delimiter =
"\r\n",
43 int retry_interval = 10);
45 boost::asio::ip::tcp::socket& socket() {
return socket_; }
48 std::string
local_endpoint() {
return goby::util::as<std::string>(socket_.local_endpoint()); }
50 std::string
remote_endpoint() {
return goby::util::as<std::string>(socket_.remote_endpoint()); }
53 bool start_specific();
59 boost::asio::ip::tcp::socket socket_;
std::string local_endpoint()
string representation of the local endpoint (e.g. 192.168.1.105:54230
std::string remote_endpoint()
string representation of the remote endpoint, (e.g. 192.168.1.106:50000
provides a basic TCP client for line by line text based communications to a remote TCP server ...
The global namespace for the Goby project.
TCPClient(const std::string &server, unsigned port, const std::string &delimiter="\r\n", int retry_interval=10)
create a TCPClient