multicast

Host UDP Multicast Online, possible?

老子叫甜甜 提交于 2019-12-12 01:09:28
问题 I have made a server that uses UDP multicast sockets. I am able to run the server on my local host and try with as many clients as I want. The problem is that i'm new to UDP and multicast and now I need to connect to another pc using the internet. For example: group = InetAddress.getByName(sendAdd); buf = senddata.getBytes(); packet = new DatagramPacket(buf, buf.length, group, senderPort); Is there anyway to host the UDP multicast server online? What InetAddress should I use in that case? 回答1

Discover a running ActiveMQ message broker using IP multicast

╄→尐↘猪︶ㄣ 提交于 2019-12-12 00:29:05
问题 The Apache ActiveMQ broker supports discovery with IP multicast. This feature is activated in the default 'demo' configuration (see below). I would like to implement the discovery feature in other languages (Delphi / Free Pascal). Is there some minimal code example or introduction page on the web which shows how this would be implemented in Java? If I understand correctly, the multicast would trigger an answer of the message broker, which contains information about IP and port of the message

Multicasting big packet contain all info to multiple clients vs individual packets to targeted clients

柔情痞子 提交于 2019-12-11 19:24:02
问题 I'm writing a C++ application MyMasterApp which sends information (OSC via UDP) to multiple clients (about 5-10), which are mobile devices (Android or iPhone) via wifi. Each device is to receive unique information, of the same type. Probably about 100-200 bytes per device, and I'll be updating all devices at 30Hz. I could send a unique data packet to each device, or I could create one big structure which contains each of the unique bits of data for each device, with the target id, multicast

simple multicast app not working on different computer on the same network

半城伤御伤魂 提交于 2019-12-11 19:04:14
问题 If I launch 2 instances of the code below in the same computer the multicast works fine. If I launch it on a different computer in the same network I won't receive anything. Any idea what could be wrong? This code should compile as is. I am testing on win10 but I get similar results when I run this on linux. #include "pch.h" #define _WINSOCK_DEPRECATED_NO_WARNINGS #include "winsock2.h" #include <iostream> #include <conio.h> #include <thread> #include <ws2tcpip.h> #pragma comment(lib, "ws2_32

How to multicast send to all network interfaces?

北城以北 提交于 2019-12-11 13:46:27
问题 Say I have N multicast-capable network interfaces. I am planning to bind N UDP sockets, one to each interface, and send to the same multicast ip/port. Is there a more direct/efficient approach than this? When receiving, I know you can listen over multiple interfaces using the same socket, but sending cannot be done with a single socket, or can it? 回答1: Another aproach is to use IP_MULTICAST_IF to change the interface used for sending multicast on the socket. With this approach, you would call

Determine the remaining TTL of a multicast packet in Java

蹲街弑〆低调 提交于 2019-12-11 12:36:57
问题 If I have a Java program that listens to multicast data, how can I tell what the remaining TTL of the incoming datagram is? I know how to set the TTL on the sending multicast socket, but I want to know the remaining TTL of the arriving packet. 回答1: If you receive the UDP datagrams with a raw socket you can inspect the TTL (or anything else in the IP or UDP headers). There are lots of gotchas, though: Raw Sockets are non-native to Java (though at least one multi-platform 3rd party add-on is

A distributed algorithm to assign a shared resource to one node out of many

守給你的承諾、 提交于 2019-12-11 11:13:36
问题 I try to implement a multicast communication to distribute some resources. I’m using jGroups for that, so I have reliable multicast and FIFO-Ordering. By doing that I wanna realise that with a distributed solution, that means without an master node that acts as a coordinator. Every node is able to start a distribution, so it is possible that two or more nodes are starting the distribution at the same time. When a node receives a distribution-message it will answer this. There are no

Stream multicast media use Gstreamer and VLC

跟風遠走 提交于 2019-12-11 09:57:34
问题 I am writing an application streaming media file ( H264, fortmat I use now is *.MP4 ). I use Gstreamer with pipeline : gst-launch-1.0 filesrc location=/big_buck_bunny_720p_h264.mp4 ! qtdemux name=d d. ! h264parse ! rtph264pay config-interval=3 pt=96 mtu=1024 ! udpsink host=224.1.1.1 port=5000 And I use the following SDP file to receive stream: c=IN IP4 224.1.1.1 m=video 5000 RTP/AVP 96 a=rtpmap:96 H264/90000 In PC I can receive the stream and it playback normally. But now I want to receive

multicast ip address - blocked in call to recvfrom

烈酒焚心 提交于 2019-12-11 09:56:17
问题 i am writing a simple multicast application. i intend to run it on localhost. i have done the following: char *maddr; . . . sendfd = socket(...); struct sockaddr_in sasend; sasend.sin_family = AF_INET; sasend.sin_port = htonl(portno); inet_ntop(maddr, &(sasend.sin_addr.s_addr)); struct sockaddr_in sarecv; memcpy(&sarecv, &sasend); recvfd = socket(...); const int on = 1; setsockopt(recvfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); // can you explain why // this is needed bind(recvfd, &sarecv

Sending Multicast UDP by GCDAsyncUdpSocket fails, no activity in Wireshark

眉间皱痕 提交于 2019-12-11 08:11:23
问题 It works okay for any known IP like this: [udpSocket sendData:datatosend toHost:@"192.168.1.113" port:port withTimeout:-1 tag:0]; But when i'm trying to use broadband multicast, nothing logged and nothing goes on [udpSocket sendData:datatosend toHost:@"192.168.1.255" port:port withTimeout:-1 tag:0]; receiving works okay, i also tried 255.255.255.255 - the same. it doesn't give any error. 回答1: I found the solution: [udpSocket enableBroadcast:YES error:nil]; 来源: https://stackoverflow.com