multicast

receiving multicast on a server with multiple interfaces (linux)

南笙酒味 提交于 2019-12-20 14:43:44
问题 To receive a multicast on my not default NIC (dvb) I do the following: open a socket (AF_INET, SOCK_DGRAM) join the multicast address with IP_ADD_MEMBERSHIP on the dvb interface bind the multicast address (note that a common error is to bind "0.0.0.0" and then receive on that socket even multicast you are not interested in) and the port at this point the only way to receive the needed multicast packets is to add in the routing table a rule to reach the network where the sender is (another

Error on MulticastSocket.joinGroup()

*爱你&永不变心* 提交于 2019-12-20 06:23:59
问题 I'm trying to execute a simple example of Multicast sockets on Java. MulticastSocket s = new MulticastSocket(6789); InetAddress group = InetAddress.getByName("230.1.1.1"); s.joinGroup(group); This code generates the error: IP_ADD_MEMBERSHIP failed (out of hardware filters?) Any idea? 回答1: Some Windows machines can experience this when the DHCP Media Sense feature is enabled (it is by default). To address this you may need to disable HDHCP media sensing as described here: http://support

Simplest possible advertise/listen arrangement through sockets

微笑、不失礼 提交于 2019-12-20 04:17:15
问题 What's wrong with the following simple arrangement. All I'm doing is to create a UDP advertiser that multicasts a message, and a listener that joins the multicast group to receive this message, both running on the same machine. string Port = "54153"; HostName Host = new HostName("224.3.0.5"); //a multicast range address //listener var L = new DatagramSocket(); L.MessageReceived += (sender2, args) => { /*something*/ }; await L.BindServiceNameAsync(Port); L.JoinMulticastGroup(Host); /

Receiving multiple multicast feeds on the same port - C, Linux

余生颓废 提交于 2019-12-20 02:17:19
问题 I have an application that is receiving data from multiple multicast sources on the same port. I am able to receive the data. However, I am trying to account for statistics of each group (i.e. msgs received, bytes received) and all the data is getting mixed up. Does anyone know how to solved this problem? If I try to look at the sender's address, it is not the multicast address, but rather the IP of the sending machine. I am using the following socket options: struct ip_mreq mreq; mreq.imr

How to Multicast (send) to first NIC?

[亡魂溺海] 提交于 2019-12-19 09:46:05
问题 I found recently that if I have a dial-up connection (this is for a kiosk) and a local area network connection, when the dial-up connection is established (with internet access), my multicast sendto would default to the dial-up rather than my LAN NIC. This made the multicast go out to the dial-up connection instead rather than to my LAN which has several multicast subscribers. I understand that I need to use IP_MULTICAST_IF to set the interface on my multicast socket. Question is how do I

TCP multicast and multithreading

余生长醉 提交于 2019-12-18 17:12:54
问题 I need to come up with clients that can multicast to other clients reliably. That implies I'll be using TCP to connect reliably between clients within a multicast group. Doesn't that come up to n^2 number of connections? That seems a little silly to me. Wouldn't/shouldn't there be a way to more easily multicast with reliability? EDIT: UNIX/C EDIT: i didn't clarify how multithreading comes into play. but if i was to open up n^2 connections, i figured, i'd be multithreading and that's even more

TCP multicast and multithreading

拜拜、爱过 提交于 2019-12-18 17:12:39
问题 I need to come up with clients that can multicast to other clients reliably. That implies I'll be using TCP to connect reliably between clients within a multicast group. Doesn't that come up to n^2 number of connections? That seems a little silly to me. Wouldn't/shouldn't there be a way to more easily multicast with reliability? EDIT: UNIX/C EDIT: i didn't clarify how multithreading comes into play. but if i was to open up n^2 connections, i figured, i'd be multithreading and that's even more

How to use GCDAsyncUdpSocket for multicast over wifi and bluetooth

℡╲_俬逩灬. 提交于 2019-12-18 13:47:26
问题 I am currently using GCDAsyncUdpSocket to send multicast datagrams over wifi between iOS devices. The Code is pretty simple.. Client self.socket = [[GCDAsyncUdpSocket alloc] initWithDelegate:self delegateQueue:dispatch_get_main_queue()]; //omitted error checking [self.socket bindToPort:12345 error:&err]; [self.socket joinMulticastGroup:@"224.0.1.1" error:&err]; [self.socket beginReceiving:&err]; Server self.multicastSocket = [[GCDAsyncUdpSocket alloc] initWithDelegate:self delegateQueue

UDP: Listening to the same port for two different multicast streams

人走茶凉 提交于 2019-12-18 13:35:15
问题 I need to listen to 2 different multicast groups using the same port. Program A will listen from 230.0.0.1 and Program B from 230.0.0.2 . Both multicast groups use the same port 2000 and I have no control over it. When I run my programs I receive both multicast streams in each program, that is both the data packets broadcasted on 230.0.0.1 and 230.0.0.2 . I suspect the problem is due to the common port. This is the code I am using to subscribe to the multicast: if( (sd = socket(AF_INET, SOCK

Erlang Multicast

天大地大妈咪最大 提交于 2019-12-18 11:48:21
问题 How do you use gen_udp in Erlang to do multicasting? I know its in the code, there is just no documentation behind it. Sending out data is obvious and simple. I was wondering on how to add memberships. Not only adding memberships at start-up, but adding memberships while running would be useful too. 回答1: Here is example code on how to listen in on Bonjour / Zeroconf traffic. -module(zcclient). -export([open/2,start/0]). -export([stop/1,receiver/0]). open(Addr,Port) -> {ok,S} = gen_udp:open