| # kdecore Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KNetwork::KMulticastSocket Class Reference

A multicast-capable datagram socket class. More...

`#include <kmulticastsocket.h>`

Inheritance diagram for KNetwork::KMulticastSocket:

[legend]
Collaboration diagram for KNetwork::KMulticastSocket:

[legend]
List of all members.

## Public Member Functions
| KMulticastSocket (QObject *parent=0L, const char *name=0L)
| ~KMulticastSocket ()
KMulticastSocketImpl * | multicastSocketDevice ()
const KMulticastSocketImpl * | multicastSocketDevice () const
virtual bool | joinGroup (const KSocketAddress &group)
virtual bool | joinGroup (const KSocketAddress &group, const KNetworkInterface &iface)
virtual bool | leaveGroup (const KSocketAddress &group)
virtual bool | leaveGroup (const KSocketAddress &group, const KNetworkInterface &iface)

## Detailed Description

A multicast-capable datagram socket class.

This class derives from KDatagramSocket adding methods to it to allow better control over the multicast functionality. In special, the join and leave group functions are added.

Other more low-level options on multicast sockets can be accessed directly with the KMulticastSocketImpl class returned by multicastSocketDevice.

Author:
  Thiago Macieira <thiago.macieira@kdemail.net>

Definition at line 48 of file kmulticastsocket.h.

## Constructor & Destructor Documentation

KNetwork::KMulticastSocket::KMulticastSocket | ( | QObject * | parent = `0L`,
|  | const char * | name = `0L`
| ) |

| Constructor.

KNetwork::KMulticastSocket::~KMulticastSocket | ( |  | ) |

| Destructor.

## Member Function Documentation

KMulticastSocketImpl* KNetwork::KMulticastSocket::multicastSocketDevice | ( |  | ) |

| Returns the multicast socket device in use by this object. Note: The returned object can be null.

const KMulticastSocketImpl* KNetwork::KMulticastSocket::multicastSocketDevice | ( |  | ) | const

| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

virtual bool KNetwork::KMulticastSocket::joinGroup | ( | const KSocketAddress & | group | ) | `[virtual]`

  | Joins a multicast group. The group to be joined is identified by the `group` parameter. Parameters:
  | group | the multicast group to join
Returns: true on success

virtual bool KNetwork::KMulticastSocket::joinGroup | ( | const KSocketAddress & | group,
|  | const KNetworkInterface & | iface
| ) | `[virtual]`

| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Joins a multicast group. This function also specifies the network interface to be used.

virtual bool KNetwork::KMulticastSocket::leaveGroup | ( | const KSocketAddress & | group | ) | `[virtual]`

  | Leaves a multicast group. The group being left is given by its address in the `group` parameter. Parameters:
  | group | the group to leave
Returns: true on successful leaving the group

virtual bool KNetwork::KMulticastSocket::leaveGroup | ( | const KSocketAddress & | group,
|  | const KNetworkInterface & | iface
| ) | `[virtual]`

| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Leaves a multicast group.

The documentation for this class was generated from the following file:

- kmulticastsocket.h

This file is part of the documentation for kdecore Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:19:18 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003