diff options
Diffstat (limited to 'src/lib/encode_server.cc')
| -rw-r--r-- | src/lib/encode_server.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/encode_server.cc b/src/lib/encode_server.cc index 7bef82b26..332c7ab46 100644 --- a/src/lib/encode_server.cc +++ b/src/lib/encode_server.cc @@ -277,9 +277,19 @@ EncodeServer::broadcast_received () if (_verbose) { cout << "Offering services to master " << _broadcast.send_endpoint.address().to_string () << "\n"; } - shared_ptr<Socket> socket (new Socket); + + try { + shared_ptr<Socket> socket (new Socket); + socket->connect (boost::asio::ip::tcp::endpoint (_broadcast.send_endpoint.address(), MAIN_SERVER_PRESENCE_PORT)); + socket->write (xml.length() + 1); + socket->write ((uint8_t *) xml.c_str(), xml.length() + 1); + } catch (...) { + + } + try { - socket->connect (boost::asio::ip::tcp::endpoint (_broadcast.send_endpoint.address(), SERVER_PRESENCE_PORT)); + shared_ptr<Socket> socket (new Socket); + socket->connect (boost::asio::ip::tcp::endpoint (_broadcast.send_endpoint.address(), BATCH_SERVER_PRESENCE_PORT)); socket->write (xml.length() + 1); socket->write ((uint8_t *) xml.c_str(), xml.length() + 1); } catch (...) { |
