ID:               22358
 Updated by:       [EMAIL PROTECTED]
 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:

fsockopen("udg://path/to/sock") should work in PHP5 (try the latest
development snapshot if you want to evaluate this).




Previous Comments:
------------------------------------------------------------------------

[2003-02-21 17:09:19] [EMAIL PROTECTED]

Status -> Assigned (so that I can find this report later)

------------------------------------------------------------------------

[2003-02-21 15:40:21] joe at ynet dot sk

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

------------------------------------------------------------------------

[2003-02-21 15:23:26] [EMAIL PROTECTED]

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

Reply via email to