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

From: Date: Fri, 21 Feb 2003 21:40:22 +0000
Subject: #22358 [Asn->Csd]: 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-33877@lists.php.net to get a copy of this message
ID: 22358 User updated by: joe at ynet dot sk Reported By: joe at ynet dot sk -Status: Assigned +Status: Closed Bug Type: Feature/Change Request Operating System: Linux 2.4.20 PHP Version: 4.3.1 Assigned To: wez New Comment: That should be ok ... I've already rewritten my sw using unix stream sockets. It would be great to have this stuff implemented, since this is the only one of four possibilities (tcp/inet, udp/inet, stream/unix, datagram/unix) that does not work in fsockopen() and as I found out going the other way - socket() - usually requires custom build :). Thnx for fast reply Joe Previous Comments: ------------------------------------------------------------------------ [2003-02-21 15:23:26] wez@php.net 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. ------------------------------------------------------------------------ [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 (#33877) next »