server: multiple NIF support for UDP

This commit is contained in:
Matej Sekoranja
2016-01-04 14:12:19 +01:00
parent 708379ec0a
commit 21a1dad07f
5 changed files with 370 additions and 272 deletions

View File

@@ -258,14 +258,12 @@ void ServerSearchHandler::handleResponse(osiSockAddr* responseFrom,
// TODO DoS attack?
const bool responseRequired = (QOS_REPLY_REQUIRED & qosCode) != 0;
// TODO bloom filter or similar server selection (by GUID)
//
// locally broadcast if unicast (qosCode & 0x80 == 0x80)
// locally broadcast if unicast (qosCode & 0x80 == 0x80) via UDP
//
if ((qosCode & 0x80) == 0x80)
{
BlockingUDPTransport::shared_pointer bt = _context->getBroadcastTransport();
BlockingUDPTransport::shared_pointer bt = dynamic_pointer_cast<BlockingUDPTransport>(transport);
if (bt && bt->hasLocalMulticastAddress())
{
// clear unicast flag