Domeniul Unix: Unix și UDG

unix:// și udg:// (udg:// începând cu PHP 5).

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

unix:// oferă acces la o conexiune de flux prin socket în domeniul Unix. udg:// oferă un transport alternativ unui socket din domeniul Unix utilizând protocolul datagramelor utilizatorului.

Socket-urile din domeniul Unix, spre deosebire de cele din domeniul Internet, nu necesită un număr de port. În cazul fsockopen() parametrul portno trebuie să fie stabilit 0.

Notă: Socket-urile din domeniul Unix nu sunt susținute pe Windows.

add a note add a note

User Contributed Notes 1 note

up
12
Matthew Fortune
17 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