iraab Posted November 19, 2007 Share Posted November 19, 2007 Hi, This is the code : <?php error_reporting(E_ALL | E_STRICT); $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); socket_bind($socket, "127.0.0.1", 2200); socket_connect($socket,"239.255.255.122",2000); $from = "239.255.255.122"; $port = 2000; socket_recvfrom($socket, $buf, 10, 1,$from, $port); //socket_recv($socket,$buf,0,0); echo "Received $buf from remote address $from and remote port $port" . PHP_EOL; ?> This is what I get : PHP Warning: socket_recvfrom(): unable to recvfrom [0]: The operation completed successfully. I've tied a lot of tries to receive this stream. What I need to do is to check if I get a UDP stream on a multicast address (e.g 239.255.255.122 port 2000). I just need to check if I get something, just to see it's alive... I didn't success to do so... is it possible to work on UDP multicast port with socket? Thanks a lot, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.