[Issue 4344] New: Sockets with multiple threads report missing/failed WSAStartup
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 18 21:02:32 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4344
Summary: Sockets with multiple threads report missing/failed
WSAStartup
Product: D
Version: D2
Platform: x86_64
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: epi at atari8.info
--- Comment #0 from Adrian Matoga <epi at atari8.info> 2010-06-18 21:02:30 PDT ---
Created an attachment (id=666)
source for server and client to reproduce this issue
Hello,
I encountered a strange problem dealing with sockets and threads under Windows
(I use 64-bit 7 Pro).
The server socket successfully accepts a connection and passes obtained socket
to newly created thread, which deals with it correctly.
However, the server socket then breaks with the exception on any next
operation.
The SocketException.errorCode is always 10093, which stands for missing or
failed WSAStartup. Indeed, when I place WSAStartup after accepting connection,
it works well (but most probably needs matching WSACleanup() call).
The single-threaded version also presents no problems.
I tried with DMD 2.046 and 2.047 with same result.
I attach example sources of both server and client showing the issue.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list