Re: Performance of while(true) loop

From: Date: Thu, 10 Sep 2009 04:58:26 +0000
Subject: Re: Performance of while(true) loop
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-297852@lists.php.net to get a copy of this message
>>>> I have a php cli script that listens on a UDP socket and, when data is [8<] >> So I think the the MSG_WAITALL is causing it to block until incoming >> data connection is closed (it never reaches the 512 byte mark before [8<] > your "clients" are not maintaining an open connection to the socket, > so it'll output as soon as the remote client disconnects from your > "server". [8<] > if you will) on the socket until a connection is made and it reads 512 > bytes / the client disconnects, which seems to be doing well for your > usage. Sorry if I'm missing something obvious, but do the concepts of "connection", "close", and "disconnect" even apply in this case, since it's a UDP socket? Ben

« previous php.general (#297852) next »