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
Posted on 2001-03-21 12:37:00 by lineadd
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.
Posted on 2001-03-21 12:49:00 by JimmyClif
i'm not really sure what you mean???
Posted on 2001-03-21 13:04:00 by lineadd
#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);
Posted on 2001-03-21 13:19:00 by Mantelus
hehe dont worry, i just had the socker handle named something differnt all works now :):):)
Posted on 2001-03-21 13:22:00 by lineadd