|
-
June 10th, 2010, 04:40 PM
#1
select() fails with 10038 porting on 64 bit
Hi
I'm currently trying to port my working application from 32 bit to 64 bit.
I see that the select() fails with error 10038. I did some research to find out the cause but
unable to drill it to the root cause. Im doubting it's to do with 32 and 64 bit models.
I tried to type cast based on some articles "converting from 32 bit to 64 bit " but no luck.
Any help is highly appreciated..... Thanks in advance
typedef struct {
SOCKET s;
Boolean Valid;
}Sock_Type, *Sock_Ptr_Type;
****************
Sock_Ptr_Type sockp;
fd_set rfds, wfds, efds;
struct timeval tv;
int n;
tv.tv_sec = 5;
tv.tv_usec = 0;
FD_ZERO(&rfds);
FD_ZERO(&wfds);
FD_ZERO(&efds);
for(int sockcnt=0;sockcnt<2;sockcnt++)
{
if(sockp[sockcnt].Valid)
{
FD_SET(sockp[sockcnt].s,&rfds);
FD_SET(sockp[sockcnt].s,&wfds);
FD_SET(sockp[sockcnt].s,&efds);
}
}
SOCKET temp = sockp[0].s;
n = select(temp+1,&rfds,&wfds,&efds,&tv);
***********
Error from select(): 10038
An operation was attempted on something that is not a socket. The specified socket parameter refers to a file, not a socket.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|