passing resources from one script to another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I'm developing a small server application that accepts connections on a
socket and then launches an interactive session with the client.

The server needs to be able to accept N connections. This part is
working famously thanks to code I've borrowed and modified from:

http://www.zend.com/lists/php-dev/200205/msg00286.html

The problem is the dialogue with the client. If I enter into a while
loop then the whole script remains occupied and cannot accept new
connections.

If I try to open a new background process with exec, then I need to pass
a resource from the listening script to the dialogue script. However, it
seems that I cannot pass a resource between scripts.

If I serialize the resource, passing it as a string to the dialogue
shell script, then unserialize it in the dialogue script, it's no longer
a resource but an integer...

Any ideas on how to get around this problem? Can it be done with PHP?

Ian

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux