[Issue 24379] New: Add std.socket.Socket.release
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 9 12:47:26 UTC 2024
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 at puremagic.com
Reporter: dlang-bugzilla at 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").
--
More information about the Digitalmars-d-bugs
mailing list