31 #ifndef __CLAW_BASIC_SOCKETBUF_HPP__ 32 #define __CLAW_BASIC_SOCKETBUF_HPP__ 48 template <
typename CharT,
typename Traits>
51 ,
public std::basic_streambuf<CharT, Traits>
61 typedef typename traits_type::int_type
int_type;
64 typedef typename traits_type::pos_type
pos_type;
67 typedef typename traits_type::off_type
off_type;
82 void set_read_time_limit(
int read_limit);
90 bool connect(
const std::string& addr,
int port);
92 void create_buffers();
93 void destroy_buffers();
95 bool buffered()
const;
106 size_t m_input_buffer_size;
112 size_t m_output_buffer_size;
115 static const size_t s_buffer_size;
121 #include <claw/net/basic_socketbuf.tpp> 123 #endif // __CLAW_BASIC_SOCKETBUF_HPP__ basic_socket * open()
Open the socket.
traits_type::off_type off_type
The type used to represent a delta in the positions.
traits_type::int_type int_type
The type used to represent integers.
traits_type::pos_type pos_type
The type used to represent a position in the stream.
Common interface for claw::net::basic_socketbuf and claw::net::socket_server.
CharT char_type
The type of the characters in the stream.
int descriptor
Type of the system description of the socket.
basic_socketbuf< char_type, traits_type > self_type
The type of this implementation.
Common interface for claw::net::basic_socketbuf and claw::net::socket_server.
Socket buffer to be used with std::basic_stream, for easy socket reading and writing.
This is the main namespace.
Traits traits_type
The traits carry some informations about the char_type.