blob: c806ba4c08787ffd7c1deb35c6f975430cc811ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--TEST--
Bug #63000: Multicast on OSX
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
if (PHP_OS !== 'Darwin') {
die('is not OSX.');
}
--FILE--
<?php
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_bind($socket, '0.0.0.0', 31057);
$so = socket_set_option($socket, IPPROTO_IP, MCAST_JOIN_GROUP, array(
"group" => '224.0.0.251',
"interface" => 0,
));
var_dump($so);
--EXPECTF--
bool(true)
|