N
NaeiKinDus
Hi there
I'm trying to code a webserver running under WinXP, multithreaded,
etc...
The creation of my threads, the handles, everything works fine except
this : the WSAEventSelect.
The first occurence of this function is in the main() and manages
connections. If a connection is accepted, it sends the newly created
socket to a thread that will handle both FD_WRITE and FD_READ...
Here's the prob : the second call to the WSAEventSelect fails and
returns WSAENOTSOCK...
I tried to send data thru that socket, and it worked...
What's the deal?
I tried the solution MSDN gave me, with WSAEventSelect(socket, NULL,
0); before setting the thing to FD_READ | FD_WRITE but it still won't
work...
Got an idea ?
Thanks.
I'm trying to code a webserver running under WinXP, multithreaded,
etc...
The creation of my threads, the handles, everything works fine except
this : the WSAEventSelect.
The first occurence of this function is in the main() and manages
connections. If a connection is accepted, it sends the newly created
socket to a thread that will handle both FD_WRITE and FD_READ...
Here's the prob : the second call to the WSAEventSelect fails and
returns WSAENOTSOCK...
I tried to send data thru that socket, and it worked...
What's the deal?
I tried the solution MSDN gave me, with WSAEventSelect(socket, NULL,
0); before setting the thing to FD_READ | FD_WRITE but it still won't
work...
Got an idea ?
Thanks.