22 #ifndef DATAGRAMCONVERGENCELAYER_H_
23 #define DATAGRAMCONVERGENCELAYER_H_
41 static const std::string TAG;
78 virtual const std::string
getName()
const;
116 : ibrcommon::Exception(what) {
119 virtual ~ConnectionNotAvailableException() throw () {
132 void init() throw ();
144 virtual ~Action() {};
147 class SegmentReceived :
public Action {
149 SegmentReceived(
size_t maxlen) : seqno(0), flags(0), data(maxlen), len(0) {};
150 virtual ~SegmentReceived() {};
155 std::vector<char> data;
159 class BeaconReceived :
public Action {
162 virtual ~BeaconReceived() {};
165 DiscoveryBeacon data;
168 class AckReceived :
public Action {
170 AckReceived() : seqno(0) {};
171 virtual ~AckReceived() {};
177 class NackReceived :
public Action {
179 NackReceived() : seqno(0), temporary(false) {};
180 virtual ~NackReceived() {};
187 class QueueBundle :
public Action {
189 QueueBundle(
const BundleTransfer &bt) : job(bt) {};
190 virtual ~QueueBundle() {};
196 class ConnectionDown :
public Action {
199 virtual ~ConnectionDown() {};
204 class NodeGone :
public Action {
207 virtual ~NodeGone() {};
212 class Shutdown :
public Action {
215 virtual ~Shutdown() {};
225 DatagramConnection& getConnection(
const std::string &identifier,
bool create)
throw (ConnectionNotAvailableException);
228 DatagramService *_service;
243 typedef std::list<DatagramConnection*> connection_list;
244 connection_list _connections;
253 size_t _stats_retries;
254 size_t _stats_failure;