31 lines
538 B
C++
31 lines
538 B
C++
#ifndef _GYR_LOW_RECEIVER
|
|
#define _GYR_LOW_RECEIVER
|
|
|
|
#include "group.h"
|
|
#include "clock.h"
|
|
#include "message.h"
|
|
|
|
class LowReceiver {
|
|
private:
|
|
Group & _group;
|
|
Clock & _clock;
|
|
int _port_low;
|
|
int _port_high;
|
|
int _socket_desc;
|
|
struct sockaddr_in * _socket_addr;
|
|
|
|
protected:
|
|
|
|
public:
|
|
LowReceiver(short port_low, short port_high, Group & grp, Clock & clk);
|
|
~LowReceiver();
|
|
void run(); // thread part
|
|
|
|
void manage(Message * mesg);
|
|
void manage_abcast(Message * mesg);
|
|
void manage_cbcast(Message * mesg);
|
|
|
|
};
|
|
|
|
#endif
|