50 #ifndef _BroadcastDualSocketService_H_
51 #define _BroadcastDualSocketService_H_
53 #include "ISocketService.h"
55 #include "system/compat/SystemCompat.h"
56 #include "system/compat/PracticalSocket.h"
57 using namespace ::br::pucrio::telemidia::ginga::core::system::compat;
59 #include "system/thread/Thread.h"
60 using namespace ::br::pucrio::telemidia::ginga::core::system::thread;
67 #ifdef __DARWIN_UNIX03
69 #define inaddrr(x) (*(struct in_addr *) myAddr->x[sizeof sa.sin_port])
82 namespace multidevice {
86 string broadcastIPAddr;
87 unsigned int interfaceIP;
89 unsigned int broadcastReadPort;
90 unsigned int broadcastWritePort;
93 UDPSocket* readSocket;
94 UDPSocket* writeSocket;
97 pthread_mutex_t mutexBuffer;
98 vector<struct frame*>* outputBuffer;
102 unsigned int readPort,
unsigned int writePort);
109 bool setSocketOptions();
113 unsigned int getInterfaceIPAddress(){
return 0;};
114 int getServicePort();
115 void dataRequest(
char* data,
int taskSize,
bool repeat=
true);
118 bool sendData(
struct frame* f);
121 bool checkOutputBuffer();
122 bool checkInputBuffer(
char* data,
int* size);
Definition: NetworkUtil.h:53
Definition: BroadcastDualSocketService.h:83
Definition: ISocketService.h:61