local multicast implemented

This commit is contained in:
Matej Sekoranja
2014-09-01 14:10:36 +02:00
parent c1115437e3
commit e6ca9ea7f2
4 changed files with 90 additions and 25 deletions

View File

@@ -215,7 +215,7 @@ byteAddress[i] = payloadBuffer->getByte();
if (payloadBuffer->getShort() != (int16)0xFFFF) return;
// accept given address if explicitly specified by sender
responseAddress.ia.sin_addr.s_addr = htonl(payloadBuffer->getInt());
responseAddress.ia.sin_addr.s_addr = payloadBuffer->getInt();
if (responseAddress.ia.sin_addr.s_addr == INADDR_ANY)
responseAddress.ia.sin_addr = responseFrom->ia.sin_addr;
@@ -358,7 +358,7 @@ void ServerChannelFindRequesterImpl::channelFindResult(const Status& /*status*/,
{
ServerSearchHandler::s_channelNameToProvider[_name] = channelFind->getChannelProvider();
}
_wasFound = wasFound;
TransportSender::shared_pointer thisSender = shared_from_this();
_context->getBroadcastTransport()->enqueueSendRequest(thisSender);
@@ -403,7 +403,6 @@ void ServerChannelFindRequesterImpl::send(ByteBuffer* buffer, TransportSendContr
buffer->putShort((int16)0);
}
control->setRecipient(_sendTo);
}