|
Boost : |
From: Bill Klein (bill_at_[hidden])
Date: 2000-12-29 10:47:39
> Michael D. Crawford wrote:
> >In Unix, TCP sockets are file descriptors and are inherited by child
> >processes after a fork. It's a great technique, but it's unfortunately
> >become assumed by a lot of people that that's just how TCP works even
> >though it's highly platform specific.
Beman Dawes wrote:
>You may be missing the point. There are existence proofs that it is
>possible to design a sockets interface that works uniformly across
>platforms. It doesn't behave exactly like Unix, or any other specific
>platform. Rather it defines its own behavior, and it is up to the
>various platform specific implementations to meet that behavior.
Absolutely, the whole "inherited by child processes" thing is just
one technique that happens to be popular on UNIX. Some months ago I
wrote a (fairly simple) C++ wrapper for a socket that was portable
across various UNIXes and Win32. Probably more primitive than what
boost is looking for, but the implementation was not that difficult
once the quirks and differences between the platforms were worked
out. I can't imagine there'd be any problem doing a proper
implementation on Mac even if their native representation of a TCP
connection is very different...
A while back there was talk about adding some thread primitives to
boost. Did this go anywhere (can't remember). I bring it up only
because as more and more interesting things (such as sockets) are
added to boost, it becomes more important that they are thread-safe
(I realize that's a loaded term, but I just mean that their thread
safety issues are documented). At least for me (and I have to
imagine a lot of others here), the utility of something like a
socket will be very limited if it can't be used in a multithreaded
program...
-Bill Klein <bill_at_[hidden]>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk