1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 01:26:11 +02:00

Adds support for unix sockets

This commit is contained in:
Kim Pepper
2020-08-13 14:06:38 +10:00
parent f9eee5cec9
commit bf1a76edb4
2 changed files with 3 additions and 2 deletions

View File

@@ -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 = "")