Re: [boost] Late asio review

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Chris Cleeland Sent: Wednesday, January 11, 2006 12:47 PM To: boost@lists.boost.org Subject: Re: [boost] Late asio review
[snip]
If you do that, you still get into the situation of having to replicate what is essentially a system interface at a level that is supposed to provide abstractions and a certain measure of system independence, right? I'm not sure that the Right Thing(TM) is to allow direct access to file descriptors or handles, but the fact remains that over the years I've come up with enough time that I've needed to access something platform or system-specific related to sockets that I've needed something like this.
I don't think it makes sense for asio to become a kitchen sink for those sorts of things, but one also shouldn't be forced to break encapsulation or abandon asio because one needs functionality from one of the lower level tools that the asio designers/developers didn't anticipate.
If possible, I'd lean toward the ability to both take advantage of the platform where it makes sense and rely on portable abstractions everywhere else. What if I need to demultiplex file I/O events as well as socket events in a TCP-based echo client? Without the socket handle, I don't know how to use asio sockets for that.

On Wed, 11 Jan 2006, Hickman, Greg wrote:
If possible, I'd lean toward the ability to both take advantage of the platform where it makes sense and rely on portable abstractions everywhere else.
I don't think we're disagreeing.
What if I need to demultiplex file I/O events as well as socket events in a TCP-based echo client? Without the socket handle, I don't know how to use asio sockets for that.
That would certainly be the way that I would do it, i.e., allow access to the socket handle. However, there might be a "better" or more boost-like way to do something like this, so I didn't want to try to drive an implementation from a perspective that might be narrower than those who've been around longer than I. What's important is not trapping future users of the abstraction by not offering ways around or through the abstraction to do platform-specific things. Since sockets are standardized and the posix standards can be wishy-washy in places asio layers atop stuff that's only semi-portable. -- Chris Cleeland, cleeland_c @ ociweb.com, http://www.milodesigns.com/~chris Principal Software Engineer, Object Computing, Inc., +1 314 579 0066 Support Me Supporting Cancer Survivors in Ride for the Roses 2005 >>>>>>>>> Donate at http://www.milodesigns.com/donate <<<<<<<<<
participants (2)
-
Chris Cleeland
-
Hickman, Greg