client: multiple NIF support

This commit is contained in:
Matej Sekoranja
2016-01-04 19:28:17 +01:00
parent 21a1dad07f
commit 9eae48aef4
4 changed files with 215 additions and 108 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ namespace epics {
namespace pvAccess {
void AbstractResponseHandler::handleResponse(osiSockAddr* responseFrom,
Transport::shared_pointer const & /*transport*/, int8 version, int8 command,
Transport::shared_pointer const & transport, int8 version, int8 command,
size_t payloadSize, ByteBuffer* payloadBuffer) {
if(_debugLevel >= 3) { // TODO make a constant of sth (0 - off, 1 - debug, 2 - more/trace, 3 - messages)
char ipAddrStr[48];
@@ -30,7 +30,7 @@ namespace epics {
ostringstream prologue;
prologue<<"Message [0x"<<hex<<(int)command<<", v0x"<<hex;
prologue<<(int)version<<"] received from "<<ipAddrStr;
prologue<<(int)version<<"] received from "<<ipAddrStr<<" on "<<transport->getRemoteName();
hexDump(prologue.str(), _description,
(const int8*)payloadBuffer->getArray(),
+5 -2
View File
@@ -390,8 +390,11 @@ inline int sendto(int s, const char *buf, size_t len, int flags, const struct so
(target == inetAddressType_broadcast_multicast && _isSendAddressUnicast[i]))
continue;
LOG(logLevelDebug, "Sending to %d bytes to %s.",
buffer->getRemaining(), inetAddressToString((*_sendAddresses)[i]).c_str());
if (IS_LOGGABLE(logLevelDebug))
{
LOG(logLevelDebug, "Sending %d bytes to %s.",
buffer->getRemaining(), inetAddressToString((*_sendAddresses)[i]).c_str());
}
int retval = sendto(_channel, buffer->getArray(),
buffer->getLimit(), 0, &((*_sendAddresses)[i].sa),