kmulticastsocketdevice.h
/* -*- C++ -*-
* Copyright (C) 2003 Thiago Macieira <thiago.macieira@kdemail.net>
*
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef KMULTICASTSOCKETDEVICE_H
#define KMULTICASTSOCKETDEVICE_H
#include "ksocketdevice.h"
#include "knetworkinterface.h"
#include "ksocketaddress.h"
namespace KNetwork {
class KMulticastSocketImplPrivate;
class KMulticastSocketImpl: public KSocketDevice
{
public:
KMulticastSocketImpl(const KSocketBase* = 0L);
virtual ~KMulticastSocketImpl();
virtual int capabilities() const;
virtual bool create(int family, int type, int protocol);
virtual bool connect(const KResolverEntry& address);
virtual int timeToLive() const;
virtual bool setTimeToLive(int ttl);
virtual bool multicastLoop() const;
virtual bool setMulticastLoop(bool enable);
virtual KNetworkInterface networkInterface();
virtual bool setNetworkInterface(const KNetworkInterface& iface);
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);
private:
KMulticastSocketImplPrivate *d;
};
} // namespace KNetwork
#endif
KNetwork::KMulticastSocketImpl::joinGroup
virtual bool joinGroup(const KSocketAddress &group)
Joins a multicast group.
KNetwork::KResolverEntry
One resolution entry.
Definition: kresolver.h:66
KNetwork::KMulticastSocketImpl::timeToLive
virtual int timeToLive() const
Retrieves the time-to-live/hop count value on multicast packets being sent.
KNetwork::KSocketAddress
A generic socket address.
Definition: ksocketaddress.h:423
KNetwork::KMulticastSocketImpl::~KMulticastSocketImpl
virtual ~KMulticastSocketImpl()
Destructor.
KNetwork::KMulticastSocketImpl::setMulticastLoop
virtual bool setMulticastLoop(bool enable)
Sets the flag indicating the loopback of packets to the sender.
KNetwork::KMulticastSocketImpl::multicastLoop
virtual bool multicastLoop() const
Retrieves the flag indicating if sent packets will be echoed back to sender.
KNetwork::KMulticastSocketImpl::networkInterface
virtual KNetworkInterface networkInterface()
Retrieves the network interface this socket is associated to.
KNetwork::KMulticastSocketImpl::connect
virtual bool connect(const KResolverEntry &address)
Overrides connection.
KNetwork::KMulticastSocketImpl::setNetworkInterface
virtual bool setNetworkInterface(const KNetworkInterface &iface)
Sets the network interface on which this socket should work.
KNetwork::KMulticastSocketImpl::setTimeToLive
virtual bool setTimeToLive(int ttl)
Sets the time-to-live/hop count for outgoing multicast packets.
KNetwork::KNetworkInterface
A place-holder class for a future network interface class.
Definition: knetworkinterface.h:39
KNetwork::KMulticastSocketImpl::KMulticastSocketImpl
KMulticastSocketImpl(const KSocketBase *=0L)
Constructor.
KNetwork::KMulticastSocketImpl::leaveGroup
virtual bool leaveGroup(const KSocketAddress &group)
Leaves a multicast group.
KNetwork::KSocketDevice
Low-level socket functionality.
Definition: ksocketdevice.h:50
KNetwork::KMulticastSocketImpl::capabilities
virtual int capabilities() const
Sets our capabilities.
KNetwork::KSocketBase
Basic socket functionality.
Definition: ksocketbase.h:97
KNetwork::KMulticastSocketImpl
The low-level backend for multicasting sockets.
Definition: kmulticastsocketdevice.h:45
KNetwork::KMulticastSocketImpl::create
virtual bool create(int family, int type, int protocol)
Overrides the socket creation.

KDE Home | KDE Accessibility Home | Description of Access Keys