i have writen a very small client/server chat type of program. everything works fine except that i am only recieving one FD_READ message from windows. should i not be recieving an FD_READ message every time there is a new packet??? many thanks
Lineadd, I asked myself almost the same question a few days ago. Fact is that if there is a packet send to the server/client there is a read message coming. In my example I never intercepted them as I tried getting them while debugging. I just inserted a MessageBox,0,ADDR test,ADDR test,0 at the FD_READ which I left running out empty after recv() them and suddenly all these funny MessageBoxes were popping up. Try to make sure that your data gets accurately send/intercepted.
i'm not really sure what you mean???
#define WM_SOCKDATA (WM_USER+1) PROTOENT *prot = getprotobyname("tcp"); sock = socket ( AF_INET, SOCK_STREAM, prot->p_proto ); ULONG mode = 1; ioctlsocket(sock, FIONBIO, &mode); WSAAsyncSelect(sock, hWnd, WM_SOCKDATA, FD_READ|FD_CONNECT);
hehe dont worry, i just had the socker handle named something differnt all works now :):):)