Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2000-12-28 13:13:28


on 12/28/00 2:41 AM, Joseph Berrios at jsberrios_at_[hidden] wrote:

> I did some research on the MAC Socket interface. I was surprised to
> find that the MAC Socket API is not compatible with the BSD Socket
> interface. But there does exist an implementation of BSD Sockets for
> the Mac. GUSI (Grand Unified Socket Interface) is a library that
> implementes BSD style sockets on the Mac. I beleive that with this
> library, my Socket library can be ported to the Mac. You can find
> more information and download this library at:
>
> http://www.iis.ee.ethz.ch/~neeri/macintosh/gusi-qa.html#Q1

The main point I was making wasn't that socket-less platforms should be
supported through third-party libraries, but that maybe Boost shouldn't have
a platform-specific library like sockets at all. As you found out, sockets
are not an universal concept. (AFAIK, most UNIX systems use sockets for
files, other devices, and Internet; Windows use UNIX-like sockets for
Internet; Macs use the UNIX-rival STREAMS system for Internet; and who knows
what other systems use, they could use something totally non-UNIX-like.)

I suggested making a TCP/IP connection class as a more general concept for a
base. (Other, non-TCP, IP, like UDP, may not work like a continuous,
guaranteed connection.) It is a virtually universal concept. Systems that
don't have TCP/IP can't get Boost anyway! -_^

The secondary point was that, no matter if you keep using sockets or
generalize to TCP/IP, mashing all the I/O functionality into one class
probably is a bad idea. For the sake of factoring and interoperability, you
should split your class into the stream-buffer and stream-formatters
paradigm that C++ I/O uses. For examples of this philosophy, you can look
at the "more_io.zip" package I have in the Boost vault at eGroups, or look
at my inspiration at Dietmar Kuehl's IOStream page:

http://www.informatik.uni-konstanz.de/~kuehl/c++/iostream/

> Hope you have a happy new year!!!!

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

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