mirror of
https://github.com/Seldaek/monolog.git
synced 2025-09-01 17:12:41 +02:00
Change protocol
This commit is contained in:
@@ -28,8 +28,14 @@ class UdpSocket
|
|||||||
{
|
{
|
||||||
$this->ip = $ip;
|
$this->ip = $ip;
|
||||||
$this->port = $port;
|
$this->port = $port;
|
||||||
$domain = $port === 0 ? AF_UNIX : AF_INET;
|
$domain = AF_INET;
|
||||||
$this->socket = socket_create($domain, SOCK_DGRAM, SOL_UDP);
|
$protocol = SOL_UDP;
|
||||||
|
// Check if we are using unix sockets.
|
||||||
|
if ($port === 0) {
|
||||||
|
$domain = AF_UNIX;
|
||||||
|
$protocol = IPPROTO_IP;
|
||||||
|
}
|
||||||
|
$this->socket = socket_create($domain, SOCK_DGRAM, $protocol);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function write($line, $header = "")
|
public function write($line, $header = "")
|
||||||
|
Reference in New Issue
Block a user