|
|
@@ -28,7 +28,8 @@ class UdpSocket
|
|
|
{
|
|
|
$this->ip = $ip;
|
|
|
$this->port = $port;
|
|
|
- $this->socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
|
|
+ $domain = $port === 0 ? AF_UNIX : AF_INET;
|
|
|
+ $this->socket = socket_create($domain, SOCK_DGRAM, SOL_UDP);
|
|
|
}
|
|
|
|
|
|
public function write($line, $header = "")
|