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 07:54:06
#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 anonymous):
A lot more thought is required to determine if there is a satisfactory
design
solution. I could, however, easily add a release() function to
posix::stream_descriptor. Does that cover your use cases?
Defiantly not. Because AFAIK posix::stream_descriptor covers only Unix
domain sockets
and I need general TCP and UDP sockets, (and Unix as well).
On Windows, adding a socket to an io_service irreversibly binds the
socket to
the underlying I/O completion port.
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.
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?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3900#comment:7> 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