Project

General

Profile

UDP prototype » History » Version 8

Greg Burri, 07/01/2009 10:44 PM

1 1 Greg Burri
h1. UDP prototype
2
3
h2. Goals
4
5
* Make a program which will listen for multicast message.
6 5 Greg Burri
* It must be work between sub-networks (vlan).
7 2 Greg Burri
* It should be also able to send. User can type a message and all other peers will print it when it is sent.
8 1 Greg Burri
* Test it with some computers.
9
10 3 Greg Burri
h2. Qt and UDP multicast
11
12
There is no support to UDP multicast in QT4.5 according this bug issue : http://www.qtsoftware.com/developer/task-tracker/index_html?method=entry&id=57952.
13 6 Greg Burri
14
Maybe it can be possible to use "setsockopt()":http://linux.die.net/man/2/setsockopt with _QAbstractSocket::socketDescriptor()_. See http://linux.die.net/man/7/ip and options for multicast like _IP_ADD_MEMBERSHIP_.
15
16
h2. Broadcast
17
18 3 Greg Burri
An alternative is to use a broadcast address with _QHostAddress::Broadcast_. It will only work with IPv4. 
19
20
It's possible to use UDP multicast only with the low-level API. This solution is OS dependent and will not be accepted.
21
22
For the moment the broadcast alternative will be used.
23 1 Greg Burri
24
h2. References
25
26
* http://en.wikipedia.org/wiki/Multicast
27 8 Greg Burri
* http://tldp.org/HOWTO/Multicast-HOWTO-6.html