|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-02-21 12:14 UTC] joe at ynet dot sk
I don't know whether this is really bug or "feature" - in later case it *should* be mentioned in documentation, that unix domain sockets in fsockopen() are *always* opened using TCP (SOCK_STREAM). I took a look into sources: in main/network.c, function _php_stream_sock_open_unix socketd = socket(PF_UNIX, SOCK_STREAM, 0); no chance for SOCK_DGRAM ... so something like "udp://filename" won't work with fsockopen(). PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 12:00:01 2025 UTC |
udp://filename doesn't make sense as udp:// implies a network connection to a host. I guess that you are making a feature request for datagram based unix sockets. I propose something like this: // unix datagram socket $sock = fsockopen("unixdg:///path/to/socket"); // unix stream socket $sock = fsockopen("unix:///path/to/socket"); $sock = fsockopen("/path/to/socket"); I will implement this for PHP 5.fsockopen("udg://path/to/sock") should work in PHP5 (try the latest development snapshot if you want to evaluate this).