Well, two things come immediately to mind.   Using sleep() or
continuously cycling and checking to see if the current time matches
whatever time criteria you need (8:00am, minutes divisible by 10, etc).
Then you don't need to hammer the sockets 1000+ times per second.

-TG

> -----Original Message-----
> From: Sherry [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 10, 2004 9:59 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] How to check port conection? 
> socket_connect and fsockopen have problems
> 
> 
> I don't need 1000 times at once...
> But I want to check ports periodically...
> For example, every 2 minutes I must check 10 ports... So 1000 
> times * 2 / 10
> = 200 minutes = only 3 hours... :(
> So, in one week, I'll have 7*24*60*10/2=50 000 connection in LISTENING
> state!
> To close these connection, I have to restart apache service... :(
> 
> Best regards,
> Sherry.
> 
> "B.A.T. Svensson" <[EMAIL PROTECTED]>
> > Why do you need to call a socket 1000 times in order
> > to find out if a service is available or not?
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to