Re: [crossplatform] Disconnect Event for Client
Posted: Fri Sep 21, 2012 3:31 pm
Hi,
this is no error. If you compile the following C code:
for 32 and 64 bit, you will see that the size is always 128.
We are using bits and it's irrelevant if we are always using longs(fds_bits.l), like in my code:
or if you use integers, but then you need to adjust __NFDBITS depending on the size of an integer. But you are right that it would be better to use integers on 64 bit systems, still this is no error just an improvement.
DarkPlayer
this is no error. If you compile the following C code:
Code: Select all
#include <stdio.h>
#include <sys/select.h>
int main(){
printf("Size of FD_SET: %d\n", sizeof(fd_set));
}
We are using bits and it's irrelevant if we are always using longs(fds_bits.l), like in my code:
Code: Select all
Structure FD_SET
fds_bits.l[#__FD_SETSIZE / #__NFDBITS]
EndStructure
DarkPlayer