Boost logo

Boost Users :

From: nils_ljunggren (nlj_at_[hidden])
Date: 2002-02-14 15:48:58


This is not my favourite design but when using TCP/IP I belive this
to
be extra-ordinary: [lib.sockstream]

The header <sockstream> defines four class templates and six types
that associate stream buffers with sockets and
assists reading and writing to and from sockets.
In addittion <sockstream> defines three operators that extracts
connection-oriented streams from
connection-oriented server-streams.

Header <sockstream> synopsis
namespace sock {
template <class charT, class traits= std::char_traits<charT> >
                    class basic_socketbuf;
                typedef basic_socketbuf<char> socketbuf;
                typedef basic_socketbuf<wchar_t> wsocketbuf;

                template <class charT, class traits=
std::char_traits<charT> >
                    class basic_isocketstream;
                typedef basic_isocketstream<char> isocketstream;
                typedef basic_isocketstream<wchar_t> wisocketstream;

                template <class charT, class traits=
std::char_traits<charT> >
                    class basic_osocketstream;
                typedef basic_osocketstream<char> osocketstream
                typedef basic_osocketstream<wchar_t> wosocketstream;

                template <class charT, class traits=
std::char_traits<charT> >
                    class basic_socketstream;
                typedef basic_socketstream<char> socketstream;
                typedef basic_socketstream<wchar_t> wsocketstream;

                template <class charT, class traits>
basic_isocketstream& operator >>
                    (basic_isocketstream<charT, traits>& at,
                     basic_isocketstream<charT, traits>& cs);
                template <class charT, class traits>
basic_isocketstream& operator >>
                    (basic_isocketstream<charT, traits>& at,
                     basic_osocketstream<charT, traits>& cs);
                template <class charT, class traits>
basic_isocketstream& operator >>
                    (basic_isocketstream<charT, traits>& at,
                     basic_socketstream<charT, traits>& cs);
           }

Please reply to mailto:nlj_at_[hidden]

[This is a Boost library proposal. - Mod]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net