Thread: [INC] HTTP
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-08-2011 , 12:41   Re: [INC] HTTP
Reply With Quote #21

I am nearly finished with a new sockets module that is both non-blocking and asynchronous, I will probably re-write all of my plugins that use sockets, and this include, once its complete. But yes, a lower value would be more appropriate in socket_change() since these are blocking sockets and we want an immediate response. I didn't use the default of 100000 by-design, it was just overlooked. Using a timeout of 0 (not null) will make select return immediately so I will try that, if it gives any problems I will use 1. Thanks again buddy.

The function used for socket_change() within the module is select()
http://linux.die.net/man/2/select
Code:
timeout is an upper bound on the amount of time elapsed before select() returns.
 It may be zero, causing select() to return immediately. (This is useful for polling.) 
If timeout is NULL (no timeout), select() can block indefinitely.
__________________

Last edited by Bugsy; 10-08-2011 at 13:51.
Bugsy is offline