22 #ifndef DATAGRAMCONNECTION_H_
23 #define DATAGRAMCONNECTION_H_
39 class DatagramConnection;
55 static const std::string
TAG;
61 void setup() throw ();
81 void queue(const
char &flags, const
unsigned int &seqno, const
char *buf, const dtn::data::
Length &len);
87 void ack(const
unsigned int &seqno);
110 class Stream :
public std::basic_streambuf<char, std::char_traits<char> >,
public std::iostream
131 virtual std::char_traits<char>::int_type overflow(std::char_traits<char>::int_type = std::char_traits<char>::eof());
132 virtual std::char_traits<char>::int_type underflow();
145 std::vector<char> _queue_buf;
156 std::vector<char> _out_buf;
160 std::vector<char> _in_buf;
180 ibrcommon::Queue<dtn::net::BundleTransfer>
queue;
189 void stream_send(const
char *buf, const dtn::data::
Length &len,
bool last) throw (DatagramException);
191 void adjust_rtt(
double value);
193 DatagramConnectionCallback &_callback;
194 const std::
string _identifier;
198 ibrcommon::Conditional _ack_cond;
199 unsigned int _last_ack;
200 unsigned int _next_seqno;
205 std::vector<
char> _head_buf;
206 dtn::data::
Length _head_len;
208 const DatagramService::Parameter _params;
212 dtn::data::
EID _peer_eid;