Sporadical asked:
Two fsockopens() in a single script uncontrolled by classes is tedious to maintain and doesn’t work very well. Then, is there a class that would allow my PHP client script to connect to different servers concurrently and handle the connections for each (supporting fwrite, etc.?)
Two fsockopens() in a single script uncontrolled by classes is tedious to maintain and doesn’t work very well. Then, is there a class that would allow my PHP client script to connect to different servers concurrently and handle the connections for each (supporting fwrite, etc.?)


1 Comment to 'How to write a PHP class to support concurrent connections?'
August 31, 2009
I am not aware of a built in class that does it. The alternative may be to set up a loop to read or write from/to multiple sockets via callback functions.
Leave a comment