How to write a PHP class to support concurrent connections?
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.?)
April
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.?)
April












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.