www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24379] New: Add std.socket.Socket.release

https://issues.dlang.org/show_bug.cgi?id=24379

          Issue ID: 24379
           Summary: Add std.socket.Socket.release
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P4
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: dlang-bugzilla thecybershadow.net

std.socket provides a way to construct a socket using an OS socket object
(Windows SOCKET handle or file descriptor).

What is missing is the inverse operation: extract the handle from the Socket,
making Socket relinquish ownership of it.

This will allow wrapping an OS socket handle into a Phobos Socket object
temporarily, which is currently not possible without duplicating the OS handle
(e.g. using "dup").

--
Feb 09