Socket Problem
-
Dann prüf doch auf Fehler mit dem Makro WSAGETSELECTERROR auf lParam.
-
WSAGetLastError liefert: WSAEWOULDBLOCK
-
lern mal lesen junge
-
Sorry für meine Ausdrucksweise. Wenn du FD_CONNECT bekommst kannst du nicht mehr WSAGetLastError benutzen sondern der Error-Code befindet sich dann in lParam und kann mit WSAGETSELECTERROR extrahiert werden.
-
Ich dachte das käme aufs gleiche raus.
WSAGETSELECTERROR(lParam) liefert : WSAECONNREFUSED
-
Ok, Problem gelöst vielen Dank für die Hilfe.
Trotzdem komisch, dass der Client FD_CONNECT gepostet bekommt obwohl WSAGETSELECTERROR WSAECONNREFUSED liefert
-
Ist aber dokumentiert.
FD_CONNECT:
After connect, WSAConnect, or WSAJoinLeaf was called with a nonblocking, connection-oriented socket. The initial operation returned with a specific error of WSAEWOULDBLOCK, but the network operation went ahead. Whether the operation eventually succeeds or not, when the outcome has been determined, FD_CONNECT happens. The client should check the error code to determine whether the outcome was successful or failed.