Bug 24379 – Add std.socket.Socket.release

Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-02-09T12:47:26Z
Last change time
2024-02-09T12:57:56Z
Keywords
industry
Assigned to
Vladimir Panteleev
Creator
Vladimir Panteleev

Comments

Comment #0 by dlang-bugzilla — 2024-02-09T12:47:26Z
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").
Comment #1 by dlang-bot — 2024-02-09T12:53:08Z
@VPanteleev-S7 created dlang/phobos pull request #8908 "Fix Bugzilla Issue 24379 - Add std.socket.Socket.release" fixing this issue: - Fix Bugzilla Issue 24379 - Add std.socket.Socket.release https://github.com/dlang/phobos/pull/8908
Comment #2 by dlang-bugzilla — 2024-02-09T12:57:56Z
*** This issue has been marked as a duplicate of issue 14471 ***