diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-03-17 20:27:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-03-22 13:29:58 +0100 |
| commit | 169c47ede14b6e86e054871a56ffa048357b4463 (patch) | |
| tree | eafb3610d6279bca8124fed133ab37dae02db2ae /src/lib/encode_server.cc | |
| parent | a461561a21f02b7a33acba9d74db5076b37ef05e (diff) | |
Make the Socket connect() call a little friendlier.
This avoids some boilerplate.
Diffstat (limited to 'src/lib/encode_server.cc')
| -rw-r--r-- | src/lib/encode_server.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/encode_server.cc b/src/lib/encode_server.cc index 08e661eac..9fd330a12 100644 --- a/src/lib/encode_server.cc +++ b/src/lib/encode_server.cc @@ -309,7 +309,7 @@ EncodeServer::broadcast_received () try { auto socket = make_shared<Socket>(); - socket->connect (boost::asio::ip::tcp::endpoint (_broadcast.send_endpoint.address(), MAIN_SERVER_PRESENCE_PORT)); + socket->connect(_broadcast.send_endpoint.address(), MAIN_SERVER_PRESENCE_PORT); socket->write (xml.bytes() + 1); socket->write ((uint8_t *) xml.c_str(), xml.bytes() + 1); } catch (...) { @@ -318,7 +318,7 @@ EncodeServer::broadcast_received () try { auto socket = make_shared<Socket>(); - socket->connect (boost::asio::ip::tcp::endpoint (_broadcast.send_endpoint.address(), BATCH_SERVER_PRESENCE_PORT)); + socket->connect(_broadcast.send_endpoint.address(), BATCH_SERVER_PRESENCE_PORT); socket->write (xml.bytes() + 1); socket->write ((uint8_t *) xml.c_str(), xml.bytes() + 1); } catch (...) { |
