30#ifndef __CLAW_SOCKET_STREAM_HPP__
31#define __CLAW_SOCKET_STREAM_HPP__
45 template <
typename CharT,
typename Traits = std::
char_traits<CharT> >
46 class basic_socket_stream :
public std::basic_iostream<CharT, Traits>
56 typedef typename traits_type::int_type
int_type;
59 typedef typename traits_type::pos_type
pos_type;
62 typedef typename traits_type::off_type
off_type;
68 explicit basic_socket_stream(
int read_delay = -1);
69 basic_socket_stream(
const char* address,
int port,
int read_delay = -1);
71 ~basic_socket_stream();
76 void set_read_time_limit(
int read_limit);
78 void open(
const char* address,
int port);
97#include <claw/net/socket_stream.tpp>
Socket buffer to be used with std::basic_socket_stream, for easy socket reading and writing.
A class to use any socket as a classic standard stream.
basic_socketbuf< char_type, traits_type > buffer_type
The type of the buffer manipulated by this stream.
Traits traits_type
The traits carry some informations about the char_type.
traits_type::int_type int_type
The type used to represent integers.
traits_type::off_type off_type
The type used to represent a delta in the positions.
traits_type::pos_type pos_type
The type used to represent a position in the stream.
CharT char_type
The type of the characters in the stream.
Socket buffer to be used with std::basic_stream, for easy socket reading and writing.
basic_socket_stream< wchar_t > wsocket_stream
Implementation of the basic_socket_stream for the wide characters.
basic_socket_stream< char > socket_stream
Implementation of the basic_socket_stream for the char type.
This is the main namespace.