30#ifndef __CLAW_OSOCKET_STREAM_HPP__
31#define __CLAW_OSOCKET_STREAM_HPP__
45 template <
typename CharT,
typename Traits = std::
char_traits<CharT> >
46 class basic_osocket_stream :
public std::basic_ostream<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;
69 typedef std::basic_ostream<CharT, Traits> super;
72 basic_osocket_stream();
73 basic_osocket_stream(
const std::string& address,
int port);
75 ~basic_osocket_stream();
81 void open(
const std::string& address,
int port);
101#include <claw/net/osocket_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 output stream.
traits_type::pos_type pos_type
The type used to represent a position in the stream.
basic_socketbuf< char_type, traits_type > buffer_type
The type of the buffer manipulated by this stream.
traits_type::off_type off_type
The type used to represent a delta in the positions.
CharT char_type
The type of the characters in the 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.
Socket buffer to be used with std::basic_stream, for easy socket reading and writing.
basic_osocket_stream< char > osocket_stream
Implementation of the basic_osocket_stream for the char type.
basic_osocket_stream< wchar_t > wosocket_stream
Implementation of the basic_osocket_stream for the wide characters.
This is the main namespace.