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