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>
59 typedef typename traits_type::int_type
int_type;
62 typedef typename traits_type::pos_type
pos_type;
65 typedef typename traits_type::off_type
off_type;
80 void set_read_time_limit(
int read_limit );
88 bool connect(
const std::string& addr,
int port );
90 void create_buffers();
91 void destroy_buffers();
93 bool buffered()
const;
104 size_t m_input_buffer_size;
110 size_t m_output_buffer_size;
113 static const size_t s_buffer_size;
119#include <claw/impl/basic_socketbuf.tpp>
Common interface for claw::net::basic_socketbuf and claw::net::socket_server.
Common interface for claw::net::basic_socketbuf and claw::net::socket_server.
basic_socket * open()
Open the socket.
Socket buffer to be used with std::basic_stream, for easy socket reading and writing.
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.
traits_type::off_type off_type
The type used to represent a delta in the positions.
Traits traits_type
The traits carry some informations about the char_type.
CharT char_type
The type of the characters in the stream.
int descriptor
Type of the system description of the socket.
This is the main namespace.