connect() and WSAAsyncSelect() trouble

Started by
0 comments, last by hplus0603 17 years, 10 months ago
Hello, I have a really strange problem with connect() and WSAAsyncSelect. Basically, when I call WSAAsyncSelect before connect(), then my client will connect to my server and somehow immediately get disconnected. However, when I first connect and then call WSAAsyncSelect() everything works perfectly and the client keeps connected and sends and receives data etc... Is it normal that you have to call connect() before you can use WSAAsyncSelect?
Advertisement
WSAAsyncSelect() marks the socket as non-blocking, so your call to connect() probably hasn't finished when it returns in that case.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement