Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRidings committed Jun 7, 2017
1 parent 65b212c commit 3f89fb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mdns.php
Expand Up @@ -17,7 +17,7 @@ public function __construct() {
error_reporting(E_ERROR | E_PARSE);
// Create $mdnssocket, bind to 5353 and join multicast group 224.0.0.251
$this->mdnssocket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
if ((preg_match("/OSX/",PHP_OS)) || (preg_match("/BSD/",PHP_OS))) {
if (PHP_OS === "Darwin" || PHP_OS === "FreeBSD") {
socket_set_option($this->mdnssocket, SOL_SOCKET, SO_REUSEPORT, 1);
} else {
socket_set_option($this->mdnssocket,SOL_SOCKET,SO_REUSEADDR, 1);
Expand Down

0 comments on commit 3f89fb1

Please sign in to comment.