Bug 17554 – non-blocking connect doesn't work for TcpSocket on win

Status
NEW
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2017-06-25T21:09:10Z
Last change time
2024-12-01T16:30:28Z
Assigned to
No Owner
Creator
Temtaime
Moved to GitHub: phobos#9717 →

Comments

Comment #0 by temtaime — 2017-06-25T21:09:10Z
auto s = new TcpSocket; s.blocking = false; s.connect(addr); ubyte[1234] tmp; auto len = s.receive(arr); assert(len != Socket.ERROR || wouldHaveBlocked, s.getErrorText); fails with "the operation was completed successfully" and passes on linux
Comment #1 by dlang-bugzilla — 2017-06-26T10:36:24Z
Does the problem persist with an equivalent C program?
Comment #2 by temtaime — 2017-06-26T10:40:09Z
Don't know and haven't C environment to test.
Comment #3 by dlang-bugzilla — 2017-06-26T10:46:45Z
std.socket is a rather thin wrapper around the platform's C socket APIs, so it's very likely that problems not specific to the wrapper are going to manifest there as well. If you want to get to the bottom of this, I'd suggest installing a free version of Visual Studio, translating the program to C, and seeing if it behaves differently.
Comment #4 by robert.schadek — 2024-12-01T16:30:28Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9717 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB