22 #ifndef STREAMCONNECTION_H_
23 #define STREAMCONNECTION_H_
228 virtual ~StreamBuffer();
279 virtual std::char_traits<char>::int_type overflow(std::char_traits<char>::int_type = std::char_traits<char>::eof());
280 virtual std::char_traits<char>::int_type underflow();
291 void __error()
const;
301 STREAM_FAILED = 1 << 0,
304 STREAM_HANDSHAKE = 1 << 3,
305 STREAM_SHUTDOWN = 1 << 4,
306 STREAM_CLOSED = 1 << 5,
307 STREAM_REJECT = 1 << 6,
308 STREAM_SKIP = 1 << 7,
309 STREAM_ACK_SUPPORT = 1 << 8,
310 STREAM_NACK_SUPPORT = 1 << 9,
311 STREAM_SOB = 1 << 10,
312 STREAM_TIMER_SUPPORT = 1 << 11
317 bool get(
const StateBits bit)
const;
318 void set(
const StateBits bit);
319 void unset(
const StateBits bit);
329 std::vector<char> in_buf_;
332 std::vector<char> out_buf_;
336 std::iostream &_stream;
343 std::queue<StreamDataSegment> _rejected_segments;
345 Length _underflow_data_remain;
346 State _underflow_state;
352 std::vector<size_t> _monitor_stats;
355 void connectionTimeout();
360 void eventBundleRefused();
361 void eventBundleForwarded();
363 StreamConnection::Callback &_callback;
367 StreamConnection::StreamBuffer _buf;