Re: [PHP] Re: php sockets

2007-12-20 Thread vixle
With any code doing a basic socket functionality, the code that i gave in the original post is suppossed to connect to a deamon, and get a message from it , instead it "makes the deamon go crazy" in the sense that it starts endless looping and loads the system resources up to max. "Jim Lucas" <

Re: [PHP] Re: php sockets

2007-12-20 Thread Jim Lucas
vixle wrote: > well i mean even if we would not consider that particular piece of code as > an example of the code that i have issues with im still rather interesting > if theres some different between the socket model used by say, c++(winsock > in my case) and the sockets used in php > because

Re: [PHP] Re: php sockets

2007-12-20 Thread vixle
well i mean even if we would not consider that particular piece of code as an example of the code that i have issues with im still rather interesting if theres some different between the socket model used by say, c++(winsock in my case) and the sockets used in php because when made a simple c++

Re: [PHP] Re: php sockets

2007-12-19 Thread Nathan Nobbe
figured id top-post on this one, since the original message was so long.. i recommend debugging with a tool like wireshark. that way you can see whats in the packets going over the wire and hopefully it will lead to a solution. -nathan On Dec 19, 2007 12:54 AM, vixle <[EMAIL PROTECTED]> wrote:

[PHP] Re: php sockets

2007-12-18 Thread vixle
this code doesn't interact with php client while with c++ based one it works just fine. .anybody? #include #include #include #include using namespace std; int i = 0; int ar = 0; const int is = 50; SOCKET stack[is]; void clientserve(void* ws) { SOCKET wsocket = *(SOCKET*)ws; int fgotus

[PHP] Re: php sockets

2007-12-18 Thread vixle
this code doesn't interact with with php client while with c++ based one it works just fine. .anybody? #include #include #include #include using namespace std; int i = 0; int ar = 0; const int is = 50; SOCKET stack[is]; void clientserve(void* ws) { SOCKET wsocket = *(SOCKET*)ws; int f

[PHP] Re: php sockets was Re: [PHP] socket_write eats data - solved

2003-09-15 Thread Daniel Souza
Probably your problems about "i can send about seven messages per second" may be relationed to OS's tcp connection stream buffering... try to flush every fd after write to it. I wrote a multi-threaded (pcntl_fork()) application in phpcli using many sockets and they worked well... array iterations a