RE: [PHP-WIN] How to check port conection? socket_connect and fsockopen have problems

From: Date: Mon, 10 May 2004 14:08:09 +0000
Subject: RE: [PHP-WIN] How to check port conection? socket_connect and fsockopen have problems
Groups: php.windows 
Request: Send a blank email to php-windows+get-23657@lists.php.net to get a copy of this message
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:sher@hotbox.ru] > Sent: Monday, May 10, 2004 9:59 AM > To: php-windows@lists.php.net > 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" <B.A.T.Svensson@lumc.nl> > > 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 > >

« previous php.windows (#23657) next »