#22358 [Opn->Asn]: it is not possible to open UDP UNIX domain socket using fsockopen()

From: Date: Fri, 21 Feb 2003 21:23:27 +0000
Subject: #22358 [Opn->Asn]: it is not possible to open UDP UNIX domain socket using fsockopen()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-33874@lists.php.net to get a copy of this message
ID: 22358 Updated by: wez@php.net Reported By: joe at ynet dot sk -Status: Open +Status: Assigned -Bug Type: Sockets related +Bug Type: Feature/Change Request Operating System: Linux 2.4.20 PHP Version: 4.3.1 -Assigned To: +Assigned To: wez New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2003-02-21 12:14:58] 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(). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22358&edit=1

« previous php.bugs (#33874) next »