📜  php unix socket 客户端 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:26.476000             🧑  作者: Mango

代码示例1
$sock = stream_socket_client('unix:///full/path/to/my/socket.sock', $errno, $errstr);
fwrite($sock, 'SOME COMMAND'."\r\n");
echo fread($sock, 4096)."\n";
fclose($sock);