blockingTCP.h: added TransportRegistry, removed "using namespace"
BlockingTCPTransport: added TransportRegistry, using osiSock.h functions wherever possible blockingUDP.h: removed "using namespace" blockingUDPConnector.cpp: using osiSock.h functions wherever possible blockingUDPTransport: using osiSock.h functions wherever possible, delete -> delete[] remote.h: removed "using namespace" arrayFIFO.h: fixed default ctor, delete -> delete[] growingCircularBuffer.h: delete -> delete[] testBlockingUDPClnt.cpp: using osiSock.h functions wherever possible testBlockingUDPCSrv.cpp: using osiSock.h functions wherever possible
This commit is contained in:
@@ -44,10 +44,11 @@ public:
|
||||
// set recipient
|
||||
sendTo.ia.sin_family = AF_INET;
|
||||
sendTo.ia.sin_port = htons(65000);
|
||||
if(inet_aton("192.168.71.129",&sendTo.ia.sin_addr)==0) {
|
||||
cout<<"error in inet_aton()"<<endl;
|
||||
if(aToIPAddr("192.168.71.129", 65000, &sendTo.ia)<0) {
|
||||
cout<<"error in aToIPAddr(...)"<<endl;
|
||||
return;
|
||||
}
|
||||
|
||||
control->setRecipient(&sendTo);
|
||||
|
||||
// send the packet
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
#include "remote.h"
|
||||
#include "blockingUDP.h"
|
||||
#include "logger.h"
|
||||
#include "inetAddressUtil.h"
|
||||
#include "hexDump.h"
|
||||
|
||||
#include <osiSock.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -43,7 +44,12 @@ void DummyResponseHandler::handleResponse(osiSockAddr* responseFrom,
|
||||
std::ostringstream os;
|
||||
|
||||
cout<<"Received new UDP datagram["<<packets+1<<"]..."<<endl;
|
||||
cout<<"From: "<<inetAddressToString(responseFrom)<<endl;
|
||||
|
||||
char ipAddressStr[24];
|
||||
|
||||
ipAddrToDottedIP(&responseFrom->ia, ipAddressStr, sizeof(ipAddressStr));
|
||||
|
||||
cout<<"From: "<<ipAddressStr<<endl;
|
||||
cout<<"Version: 0x"<<hex<<(int)version<<endl;
|
||||
cout<<"Command: 0x"<<hex<<(int)command<<endl;
|
||||
cout<<"Payload size: "<<dec<<payloadSize<<endl;
|
||||
|
||||
Reference in New Issue
Block a user