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;
70 typedef basic_socketbuf<char_type, traits_type>
self_type;
73 basic_socketbuf(
int read_limit = -1);
74 virtual ~basic_socketbuf();
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>
Common interface for claw::net::basic_socketbuf and claw::net::socket_server.
basic_socket()
Constructor.
basic_socket * open()
Open the socket.
Traits traits_type
The traits carry some informations about the char_type.
CharT char_type
The type of the characters in the stream.
traits_type::off_type off_type
The type used to represent a delta in the positions.
basic_socketbuf< char_type, traits_type > self_type
The type of this implementation.
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.
int descriptor
Type of the system description of the socket.
This is the main namespace.