multicast

How do I choose a multicast address for my application's use?

别来无恙 提交于 2019-11-28 14:07:09
问题 How should I choose an IPv4 multicast address for my application's use? I may need more than one (a whole range perhaps ultimately) but just want to avoid conflicts with other applications. Packets will be entirely contained within an administrative domain, probably a LAN If several independent instances of my application are in use on the same network, they could each use their own multicast address - but if they don't, they will be able to coexist anyway, they'll just have a small amount of

Can I use broadcast or multicast for TCP?

99封情书 提交于 2019-11-28 08:08:31
For Internet Protocol (IP) I can use multicast : in IPv4: Internet Group Management Protocol (IGMP) in IPv6: Multicast Listener Discovery Also, in example, for UDP I can use: broadcast - to send packet to range of addresses multicast - to send packet to list of specified addresses But can I use something of these for TCP? No, you can't. TCP is a protocol for communication between exactly two endpoints. Compared to UDP it features reliable transport, that means, that packets get not only send, but it is expected that the peer acknowledges the receipt of the data and that data will be

how to list rooms on socket.io nodejs server

孤街醉人 提交于 2019-11-28 05:49:07
after progress on the question how to create socket.io multicast groups , I found making rooms a great way to do what I needed. However, it would be great to know about all the rooms, without an extra data-structure. Is it possible to get a list of all rooms on the server from the server socket? Alfred The short answer: io.sockets.adapter.rooms I analysed io : I got the following output: { server: { stack: [ [Object], [Object], [Object], [Object], [Object], [Object] ], connections: 3, allowHalfOpen: true, watcher: { host: [Circular], callback: [Function] }, _events: { request: [Function],

Multicast on Android 2.2

白昼怎懂夜的黑 提交于 2019-11-28 05:28:54
Has anyone gotten Multicast to work on Android 2.2, specifically JmDNS for Bonjour service detection. There are many questions & answers from the Android 1.5->2.0 timeframe, including on stackOverflow, that indicate varying levels of success, and a bug in the bug tracker that indicate it was fixed, and closed, for 2.2 ( http://code.google.com/p/android/issues/detail?id=2323 ) . I've tried the "TuneControl" source code, but that worked on ~1.5 and has not been updated, and does not work for me on 2.2. So, the questions... 1) Has anyone seen multicast work on 2.2, specifically JmDNS, and

How to multicast with ipv6 udp socket in C/C++ on linux?

旧城冷巷雨未停 提交于 2019-11-28 03:52:33
问题 (English is not my native tongue, don't worry if some sentences are strange ;) ). I was developing a PONG game and by the way creating some classes to help me managing window, event ... and network because I added a LAN feature to the game but currently you have to enter the address of the one with who you want to play with. And a solution to that was a broadcast (scanning LAN for player) . This was easy with ipv4, just use the address 255.255.255.255 but we are in 2017 and provide a feature

Network discovery in Java Multicast/Broadcast Java

百般思念 提交于 2019-11-28 02:19:48
问题 Here's what I'm trying to do- A server sends out "Alive message to all the PCs on the network and the PCs which are up and running, respond to the call by sending their IP. I'm looking at a lightweight piece of coding as this will form a small bit of my application. I've looked at Jini and other services but find that I may not need even half of their features(except for the network discovery) Is it ok if I: 1. Use a for loop where a server opens a socket, checks(using a for loop) if all the

Multicast from kernel to user space via Netlink in C

笑着哭i 提交于 2019-11-28 02:09:29
I was trying to write a simple program communicating between kernel and user space using Netlink. Basically here's what I wanted to achieve: User space program starts binding to a user defined multicast group. Insert kernel module Kernel module sends a message to this multicast group User space program receives the message Here's my code: ======User space program====== #include<stdio.h> #include<string.h> #include<stdlib.h> #include<sys/socket.h> #include<linux/netlink.h> #include<sys/types.h> #include<unistd.h> #define MYPROTO NETLINK_USERSOCK #define MYMGRP 0x21 //User defined group,

How to join source specific multicast group in C# (IGMPv3)

故事扮演 提交于 2019-11-28 01:57:06
问题 We have a C# application that can join and receives data from a multicast group. This works well. We now want to support IGMPv3 and be able to specify the IP of the source when joining a multicast group. From the MSDN documentation, I don't see how to do this. I have found the following link that seems to answer my question. http://social.msdn.microsoft.com/Forums/en/netfxnetcom/thread/e8063f6d-22f5-445e-a00c-bf46b46c1561 And here is how I implemented this: byte[] membershipAddresses = new

Java Multicast Time To Live is always 0

老子叫甜甜 提交于 2019-11-28 01:55:01
I have a problem with setting the TTL on my Datagram packets. I am calling the setTTL(...) method on the packet before sending the packet to the multicastSocket but if I capture the packet with ethereal the TTL field is always set to 0 pfranza Funny that you should ask this, because I just wrote about this yesterday , I was having the same problem about 6 months ago. Basically you have to set an special system property telling the JVM to use an IPv4 stack: -Djava.net.preferIPv4Stack=true To implement pfranza's fix in Oracle, where you don't have a command line: Set the property java.net

How do you programmatically configure hazelcast for the multicast discovery mechanism?

折月煮酒 提交于 2019-11-27 21:13:58
How do you programmatically configure hazelcast for the multicast discovery mechanism? Details: The documentation only supplies an example for TCP/IP and is out-of-date: it uses Config.setPort(), which no longer exists. My configuration looks like this, but discovery does not work (i.e. I get the output "Members: 1" : Config cfg = new Config(); NetworkConfig network = cfg.getNetworkConfig(); network.setPort(PORT_NUMBER); JoinConfig join = network.getJoin(); join.getTcpIpConfig().setEnabled(false); join.getAwsConfig().setEnabled(false); join.getMulticastConfig().setEnabled(true); join