Re: [Boost-bugs] [Boost C++ Libraries] #3900: Request for support of "release" member function or assign without ownership transfer to asio socket

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3900: Request for support of "release" member function or assign without ownership transfer to asio socket
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-18 09:20:59


#3900: Request for support of "release" member function or assign without
ownership transfer to asio socket
---------------------------------+------------------------------------------
 Reporter: artyomtnk@… | Owner: chris_kohlhoff
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: |
---------------------------------+------------------------------------------

Comment(by chris_kohlhoff):

 Replying to [comment:7 anonymous]:
> Defiantly not. Because AFAIK posix::stream_descriptor covers only Unix
 domain
> sockets and I need general TCP and UDP sockets, (and Unix as well).

 I think you're confusing it with asio::local::stream_protocol::socket. If
 you're using it with null_buffers, posix::stream_descriptor basically
 works with anything that is selectable. That means sockets (TCP, UDP,
 UNIX), pipes, and a lot more.

> However, if you use BOOST_ASIO_DISABLE_IOCP it would not be a problem.
> So, maybe it is possible to make release() fail in case IOCP is used and
> socket can't be released like cancel() under XP and below.

 As I said, there's still a portability issue. Adding release() isn't a
 satisfactory solution in my opinion. At least with cancel() we know that
 the OSes that don't support it are slowly fading away.

> 2nd question, at least all known to me Unix APIs: epoll, kqueue,
 /dev/poll provide
> and option to deassign socket from the underlying file descriptor.
 Shouldn't be
> something like that in Windows for IOCP?

 There should be, but unfortunately there isn't.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3900#comment:8>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC