RFC: Drop notice: KNetwork

Thiago Macieira thiago at kde.org
Mon Mar 5 17:24:06 GMT 2007


Andreas Aardal Hanssen wrote:
>I think you can implement Multicast by subclassing QUdpSocket. If not,
> we can always do it. Is it a requirement from existing (KDE3)
> applications?

All you need in order to implement multicast sockets is an UDP socket, 
plus the ability to join/leave groups and set the flag if you want to 
receive your own packets.

Easier said than done: you need a sockaddr structure in order to join 
groups and you join via low-level setsockopt. Sockaddr by itself has the 
issue of containing sa_len (BSD-style) or not (other), plus the fact that 
it can be IPv4 or IPv6. Next, the low-level calls depend on the system 
availability, etc. At least the network interface ID can be obtained from 
QNetworkInterface, as well as the address.

In sum: this is the exact kind of task that Qt is great at abstracting and 
providing an easy, portable interface :-)

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070305/07394da7/attachment.sig>


More information about the kde-core-devel mailing list