31 #ifndef __CLAW_BASIC_SOCKETBUF_HPP__
32 #define __CLAW_BASIC_SOCKETBUF_HPP__
47 template<
typename CharT,
typename Traits >
49 public std::basic_streambuf<CharT, Traits>
52 typedef CharT char_type;
53 typedef Traits traits_type;
54 typedef typename traits_type::int_type int_type;
55 typedef typename traits_type::pos_type pos_type;
56 typedef typename traits_type::off_type off_type;
75 virtual int_type
overflow( int_type c = traits_type::eof() );
78 bool connect(
const std::string& addr,
int port );
80 void create_buffers();
81 void destroy_buffers();
83 bool buffered()
const;
91 char_type* m_input_buffer;
94 size_t m_input_buffer_size;
97 char_type* m_output_buffer;
100 size_t m_output_buffer_size;
103 static const size_t s_buffer_size;
111 #endif // __CLAW_BASIC_SOCKETBUF_HPP__