Dominio Unix: Unix e UDG

unix:// e udg://.

  • unix:///tmp/mysock
  • udg:///tmp/mysock

unix:// fornisce accesso a una connessione stream socket nel dominio Unix. udg:// fornisce un trasporto alternativo a un socket del dominio Unix usando il protocollo user datagram.

I socket del dominio Unix, a differenza dei socket del dominio Internet, non si aspettano un numero di porta. Nel caso di fsockopen() il parametro portno dovrebbe essere impostato a 0.

Nota: I socket del dominio Unix non sono supportati su Windows.

add a note

User Contributed Notes 1 note

up
12
Matthew Fortune
19 years ago
It appears that fsockopen prior to php5 did not need the unix:// qualifier when opening a unix domain socket:

php4: fsockopen("/tmp/mysocket"......);

php5: fsockopen("unix:///tmp/mysocket"......);

This caught me out when upgrading.
To Top