Project

General

Profile

UDP prototype » History » Revision 8

Revision 7 (Greg Burri, 07/01/2009 01:48 PM) → Revision 8/9 (Greg Burri, 07/01/2009 10:44 PM)

h1. UDP prototype 

 h2. Goals 

 * Make a program which will listen for multicast message. 
 * It must be work between sub-networks (vlan). 
 * It should be also able to send. User can type a message and all other peers will print it when it is sent. 
 * Test it with some computers. 

 h2. Qt and UDP multicast 

 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. 

 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_. 

 h2. Broadcast 

 An alternative is to use a broadcast address with _QHostAddress::Broadcast_. It will only work with IPv4.  

 It's possible to use UDP multicast only with the low-level API. This solution is OS dependent and will not be accepted. 

 For the moment the broadcast alternative will be used. 

 h2. References 

 * http://en.wikipedia.org/wiki/Multicast 
 * http://tldp.org/HOWTO/Multicast-HOWTO-6.html (fr) http://www.ibiblio.org/pub/Linux/docs/HOWTO/translations/fr/html-1page/Multicast-HOWTO.html