Persistent local domain socket in php
问题 The answers I've found to this question (such as here, here, and here) all involve pfsockopen(), which seems geared to non-local socket connections. However, the code I've written so far uses php to access a C++ server through a local connection. I want this connection to be persistent (so that I can use it for Comet, incidentally). Here's my non-persistent version: <?php session_start(); ... if (($sock = socket_create(AF_UNIX, SOCK_STREAM,0)) === false) { echo "socket_create() failed: reason