Re: [PHP] Performance of while(true) loop

2009-09-10 Thread Jim Lucas
APseudoUtopia wrote: Hey list, I have a php cli script that listens on a UDP socket and, when data is sent to the socket, the script inserts it into a database. I'm using the real BSD socket functions, not fsock. The script runs socket_create(), then socket_bind(). Then it starts a

[PHP] Performance of while(true) loop

2009-09-09 Thread APseudoUtopia
Hey list, I have a php cli script that listens on a UDP socket and, when data is sent to the socket, the script inserts it into a database. I'm using the real BSD socket functions, not fsock. The script runs socket_create(), then socket_bind(). Then it starts a while(TRUE) loop. Within the loop,

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia apseudouto...@gmail.com wrote: Hey list, I have a php cli script that listens on a UDP socket and, when data is sent to the socket, the script inserts it into a database. I'm using the real BSD socket functions, not fsock. The script runs

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread APseudoUtopia
On Wed, Sep 9, 2009 at 10:39 PM, Eddie Drapkinoorza...@gmail.com wrote: On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia apseudouto...@gmail.com wrote: Hey list, I have a php cli script that listens on a UDP socket and, when data is sent to the socket, the script inserts it into a database.

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Eddie Drapkin
On Wed, Sep 9, 2009 at 10:53 PM, APseudoUtopia apseudouto...@gmail.com wrote: On Wed, Sep 9, 2009 at 10:39 PM, Eddie Drapkinoorza...@gmail.com wrote: On Wed, Sep 9, 2009 at 10:32 PM, APseudoUtopia apseudouto...@gmail.com wrote: Hey list, I have a php cli script that listens on a UDP socket

Re: [PHP] Performance of while(true) loop

2009-09-09 Thread Ben Dunlap
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