Re: socket multithreading problem

[email protected] (Nathan Rixham)
Newsgroups php.general
Message-ID <[email protected]>
Ümit CAN wrote:
> Hi All;
>    
> I use PHP socket programming  and I wish  multithreading operation of the socket .
> When I have many requests on this  socket , before the  first one request is anwered , the second request  is not aswered  till the first one is finished.
> How can both  requests  work  together without  waiting each  other ? 

1: you can't multi thread PHP
2: you can 'fork' PHP processes using the pcntl_ functions to achieve 
what you are looking for by making a cli based php deamon.

Best,

Nathan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.