22 #ifndef DATAGRAMCONNECTION_H_
23 #define DATAGRAMCONNECTION_H_
40 class DatagramConnection;
59 static const std::string TAG;
66 void setup()
throw ();
67 void finally()
throw ();
92 void ack(
const unsigned int &seqno);
97 void nack(
const unsigned int &seqno,
const bool temporary);
125 class Stream :
public std::basic_streambuf<char, std::char_traits<char> >,
public std::iostream
156 virtual std::char_traits<char>::int_type overflow(std::char_traits<char>::int_type = std::char_traits<char>::eof());
157 virtual std::char_traits<char>::int_type underflow();
173 std::vector<char> _queue_buf;
179 bool _queue_buf_head;
187 std::vector<char> _out_buf;
191 std::vector<char> _in_buf;
218 void skip()
throw ();
221 void finally()
throw ();
227 DatagramConnection::Stream &_stream;
243 void adjust_rtt(
double value);
248 bool sw_frames_full();
253 void sw_timeout(
bool last);
256 const std::string _identifier;
257 DatagramConnection::Stream _stream;
258 DatagramConnection::Sender _sender;
261 unsigned int _last_ack;
262 unsigned int _next_seqno;
267 std::vector<char> _head_buf;
281 : flags(0), seqno(0), retry(0) { }
284 virtual ~window_frame() { }
288 std::vector<char> buf;
292 std::list<window_frame> _sw_frames;