View previous topic :: View next topic |
Author |
Message |
kwlee
Joined: 23 Nov 2007 Posts: 5
|
Posted: Fri Nov 23, 2007 8:21 am Post subject: Use Poll or select for linux |
|
|
Hi,
well, it should not be a bug. In miniupnpc.c, the ReceiveData function, and in Linux environment, why can't use "select" waiting data ?
I tried change poll(this one is OK) to select in Linux, but always
timeout... any trick ?
Best Regards,
KWLEE |
|
Back to top |
|
 |
kwlee
Joined: 23 Nov 2007 Posts: 5
|
Posted: Fri Nov 23, 2007 8:54 am Post subject: |
|
|
OK, I got the clue...
the first parameter in select should change from 0 to max_fd + 1
then it should be OK on linux. |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1555
|
Posted: Sun Nov 25, 2007 1:19 pm Post subject: |
|
|
indeed, the select call should be
n = select(FD_SETSIZE, &socketSet, 0, 0, &timeout); _________________ Main miniUPnP author.
http://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
© 2007 Thomas Bernard, author of MiniUPNP.
|