mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-31 00:40:15 +02:00
Change protocol
This commit is contained in:
@@ -28,8 +28,14 @@ class UdpSocket
|
||||
{
|
||||
$this->ip = $ip;
|
||||
$this->port = $port;
|
||||
$domain = $port === 0 ? AF_UNIX : AF_INET;
|
||||
$this->socket = socket_create($domain, SOCK_DGRAM, SOL_UDP);
|
||||
$domain = AF_INET;
|
||||
$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 = "")
|
||||
|
Reference in New Issue
Block a user