• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
  • network
tdemulticastsocketdevice.h
1 /*
2  * Copyright (C) 2003 Thiago Macieira <thiago.macieira@kdemail.net>
3  *
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining
6  * a copy of this software and associated documentation files (the
7  * "Software"), to deal in the Software without restriction, including
8  * without limitation the rights to use, copy, modify, merge, publish,
9  * distribute, sublicense, and/or sell copies of the Software, and to
10  * permit persons to whom the Software is furnished to do so, subject to
11  * the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included
14  * in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
25 #ifndef TDEMULTICASTSOCKETDEVICE_H
26 #define TDEMULTICASTSOCKETDEVICE_H
27 
28 #include "tdesocketdevice.h"
29 #include "knetworkinterface.h"
30 #include "tdesocketaddress.h"
31 
32 namespace KNetwork {
33 
34 class KMulticastSocketImplPrivate;
35 
45 class KMulticastSocketImpl: public TDESocketDevice
46 {
47 public:
51  KMulticastSocketImpl(const TDESocketBase* = 0L);
52 
56  virtual ~KMulticastSocketImpl();
57 
61  virtual int capabilities() const;
62 
66  virtual bool create(int family, int type, int protocol);
67 
71  virtual bool connect(const KResolverEntry& address);
72 
76  virtual int timeToLive() const;
77 
84  virtual bool setTimeToLive(int ttl);
85 
90  virtual bool multicastLoop() const;
91 
98  virtual bool setMulticastLoop(bool enable);
99 
103  virtual KNetworkInterface networkInterface();
104 
111  virtual bool setNetworkInterface(const KNetworkInterface& iface);
112 
120  virtual bool joinGroup(const TDESocketAddress& group);
121 
127  virtual bool joinGroup(const TDESocketAddress& group,
128  const KNetworkInterface& iface);
129 
137  virtual bool leaveGroup(const TDESocketAddress& group);
138 
143  virtual bool leaveGroup(const TDESocketAddress& group,
144  const KNetworkInterface& iface);
145 private:
146  KMulticastSocketImplPrivate *d;
147 };
148 
149 } // namespace KNetwork
150 
151 #endif
KNetwork::TDESocketAddress
A generic socket address.
Definition: tdesocketaddress.h:423
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::TDESocketDevice
Low-level socket functionality.
Definition: tdesocketdevice.h:50
KNetwork::KMulticastSocketImpl::KMulticastSocketImpl
KMulticastSocketImpl(const TDESocketBase *=0L)
Constructor.
KNetwork::KMulticastSocketImpl::~KMulticastSocketImpl
virtual ~KMulticastSocketImpl()
Destructor.
KNetwork::KMulticastSocketImpl::joinGroup
virtual bool joinGroup(const TDESocketAddress &group)
Joins a multicast group.
KNetwork
A namespace to store all networking-related (socket) classes.
Definition: kbufferedsocket.h:36
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::TDESocketBase
Basic socket functionality.
Definition: tdesocketbase.h:97
KNetwork::KMulticastSocketImpl::capabilities
virtual int capabilities() const
Sets our capabilities.
KNetwork::KMulticastSocketImpl::leaveGroup
virtual bool leaveGroup(const TDESocketAddress &group)
Leaves a multicast group.
KNetwork::KMulticastSocketImpl
The low-level backend for multicasting sockets.
Definition: tdemulticastsocketdevice.h:45
KNetwork::KMulticastSocketImpl::create
virtual bool create(int family, int type, int protocol)
Overrides the socket creation.

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.