I'm looking into doing persistent socket connections with PHP to a Java based application.
I know I can do it with pfsockopen, however looking on the PHP docs some of the comments suggest it might not be actually acting quite how i might expect.
Does anybody have any experience with this? or any advice?
When the page runs, does pfsockopen return the current connection if there is one and open another one if there isn't one already?
The logic behind persistent connections and a language like PHP confuses me, since its stateless etc.