Boost logo

Boost :

From: William Kempf (sirwillard_at_[hidden])
Date: 2000-09-07 17:39:00


--- In boost_at_[hidden], Phil Edwards <pedwards_at_d...> wrote:
>
> I'm interested in coding up some streambufs to work with POSIX-style
> network sockets.

It would be useful if it worked with Winsock as well (there's not
that many differences, especially when you exclude the WSA* variants
in Winsock which are not appropriate for a socket_stream).

> Dietmar has kindly volunteered to answer my pestering
> questions when I get that far. :-)

I've got code that works with VC++ using the Dinkumware Iostreams
(close, but not fully compliant to the final standard) and Winsock.
It's minimalist, but not that far from what you'll want in the end.
So I guess I can answer some questions as well, though Dietmar
definately knows more about this subject than I do.

> But first, a legal/ethical question:
>
> Many of you have probably seen or used the Socket++ library that
was actively
> maintained from 1994 to 1997 by Gnanasekaran Swaminathan. The
latest version
> (1.11) uses the classic pre-standard IOStreams and does not compile
easily,
> if it all, with recent compilers. There's a fair amount of work
already
> done here that it would be silly to waste.

Most of the work is in the iostreams themselves, and they've changed
enough that it's not really worth trying to reuse this code any way.
I'd just start from scratch here, which eliminates any possible
legal/ethical problems.
 
The only other code that I'm aware of in Socket++ included things
like an Address class that resolved network addresses from IP or host
strings and higher level wrappers for various internet protocols
(such as SMTP). I think you can do a better job of creating an
address class than that that was in Socket++, so I'd start from
scratch there as well. The other protocol classes I'd consider not
doing at all. If you do create them I wouldn't follow Socket++ there
either... the interface was kludgy, IMHO. It also wouldn't hurt to
work on such classes after the socket_stream concept was nailed down
and implemented within Boost.

Bill Kempf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk