#include <tdemulticastsocketdevice.h>
Public Member Functions | |
KMulticastSocketImpl (const TDESocketBase *=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 TDESocketAddress &group) |
virtual bool | joinGroup (const TDESocketAddress &group, const KNetworkInterface &iface) |
virtual bool | leaveGroup (const TDESocketAddress &group) |
virtual bool | leaveGroup (const TDESocketAddress &group, const KNetworkInterface &iface) |
Public Member Functions inherited from KNetwork::TDESocketDevice | |
TDESocketDevice (const TDESocketBase *=0L) | |
TDESocketDevice (int fd) | |
virtual | ~TDESocketDevice () |
int | socket () const |
virtual bool | setSocketOptions (int opts) |
virtual bool | open (int mode) |
virtual void | close () |
virtual void | flush () |
bool | create (const KResolverEntry &address) |
virtual bool | bind (const KResolverEntry &address) |
virtual bool | listen (int backlog=5) |
virtual TDESocketDevice * | accept () |
virtual bool | disconnect () |
virtual TQ_LONG | bytesAvailable () const |
virtual TQ_LONG | waitForMore (int msecs, bool *timeout=0L) |
virtual TQ_LONG | readBlock (char *data, TQ_ULONG maxlen) |
virtual TQ_LONG | readBlock (char *data, TQ_ULONG maxlen, TDESocketAddress &from) |
virtual TQ_LONG | peekBlock (char *data, TQ_ULONG maxlen) |
virtual TQ_LONG | peekBlock (char *data, TQ_ULONG maxlen, TDESocketAddress &from) |
virtual TQ_LONG | writeBlock (const char *data, TQ_ULONG len) |
virtual TQ_LONG | writeBlock (const char *data, TQ_ULONG len, const TDESocketAddress &to) |
virtual TDESocketAddress | localAddress () const |
virtual TDESocketAddress | peerAddress () const |
virtual TDESocketAddress | externalAddress () const |
TQSocketNotifier * | readNotifier () const |
TQSocketNotifier * | writeNotifier () const |
TQSocketNotifier * | exceptionNotifier () const |
virtual bool | poll (bool *input, bool *output, bool *exception=0L, int timeout=-1, bool *timedout=0L) |
bool | poll (int timeout=-1, bool *timedout=0L) |
Public Member Functions inherited from KNetwork::KActiveSocketBase | |
KActiveSocketBase () | |
virtual | ~KActiveSocketBase () |
virtual Offset | size () const |
virtual Offset | at () const |
virtual bool | at (Offset) |
virtual bool | atEnd () const |
virtual int | getch () |
virtual int | putch (int ch) |
virtual int | ungetch (int) |
Public Member Functions inherited from KNetwork::TDESocketBase | |
TDESocketBase () | |
virtual | ~TDESocketBase () |
virtual bool | setBlocking (bool enable) |
bool | blocking () const |
virtual bool | setAddressReuseable (bool enable) |
bool | addressReuseable () const |
virtual bool | setIPv6Only (bool enable) |
bool | isIPv6Only () const |
virtual bool | setBroadcast (bool enable) |
bool | broadcast () const |
TDESocketDevice * | socketDevice () const |
virtual void | setSocketDevice (TDESocketDevice *device) |
int | setRequestedCapabilities (int add, int remove=0) |
SocketError | error () const |
TQString | errorString () const |
TQMutex * | mutex () const |
Public Member Functions inherited from KNetwork::KPassiveSocketBase | |
KPassiveSocketBase () | |
virtual | ~KPassiveSocketBase () |
Additional Inherited Members | |
Public Types inherited from KNetwork::TDESocketDevice | |
enum | Capabilities { CanConnectString = 0x01 , CanBindString = 0x02 , CanNotBind = 0x04 , CanNotListen = 0x08 , CanMulticast = 0x10 , CanNotUseDatagrams = 0x20 } |
Public Types inherited from KNetwork::TDESocketBase | |
enum | SocketOptions { Blocking = 0x01 , AddressReuseable = 0x02 , IPv6Only = 0x04 , Keepalive = 0x08 , Broadcast = 0x10 } |
enum | SocketError { NoError = 0 , LookupFailure , AddressInUse , AlreadyCreated , AlreadyBound , AlreadyConnected , NotConnected , NotBound , NotCreated , WouldBlock , ConnectionRefused , ConnectionTimedOut , InProgress , NetFailure , NotSupported , Timeout , UnknownError , RemotelyDisconnected } |
Static Public Member Functions inherited from KNetwork::TDESocketDevice | |
static TDESocketDevice * | createDefault (TDESocketBase *parent) |
static TDESocketDevice * | createDefault (TDESocketBase *parent, int capabilities) |
static TDESocketDeviceFactoryBase * | setDefaultImpl (TDESocketDeviceFactoryBase *factory) |
static void | addNewImpl (TDESocketDeviceFactoryBase *factory, int capabilities) |
Static Public Member Functions inherited from KNetwork::TDESocketBase | |
static TQString | errorString (SocketError code) |
static bool | isFatalError (int code) |
Protected Member Functions inherited from KNetwork::TDESocketDevice | |
TDESocketDevice (bool, const TDESocketBase *parent=0L) | |
virtual TQSocketNotifier * | createNotifier (TQSocketNotifier::Type type) const |
Protected Member Functions inherited from KNetwork::KActiveSocketBase | |
void | setError (int status, SocketError error) |
void | resetError () |
Protected Member Functions inherited from KNetwork::TDESocketBase | |
virtual int | socketOptions () const |
bool | hasDevice () const |
void | setError (SocketError error) |
Protected Attributes inherited from KNetwork::TDESocketDevice | |
int | m_sockfd |
Detailed Description
The low-level backend for multicasting sockets.
This class is an interface providing methods for handling multicast operations.
Definition at line 45 of file tdemulticastsocketdevice.h.
Constructor & Destructor Documentation
◆ KMulticastSocketImpl()
KNetwork::KMulticastSocketImpl::KMulticastSocketImpl | ( | const TDESocketBase * | = 0L | ) |
Constructor.
◆ ~KMulticastSocketImpl()
|
virtual |
Destructor.
Member Function Documentation
◆ capabilities()
|
virtual |
Sets our capabilities.
Reimplemented from KNetwork::TDESocketDevice.
◆ connect()
|
virtual |
Overrides connection.
Multicast sockets may not connect.
Reimplemented from KNetwork::TDESocketDevice.
◆ create()
|
virtual |
Overrides the socket creation.
Reimplemented from KNetwork::TDESocketDevice.
◆ joinGroup() [1/2]
|
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
◆ joinGroup() [2/2]
|
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.
◆ leaveGroup() [1/2]
|
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
◆ leaveGroup() [2/2]
|
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.
◆ multicastLoop()
|
virtual |
Retrieves the flag indicating if sent packets will be echoed back to sender.
◆ networkInterface()
|
virtual |
Retrieves the network interface this socket is associated to.
◆ setMulticastLoop()
|
virtual |
Sets the flag indicating the loopback of packets to the sender.
- Parameters
-
enable if true, will echo back
- Returns
- true if setting the value was successful.
◆ setNetworkInterface()
|
virtual |
Sets the network interface on which this socket should work.
- Parameters
-
iface the interface to associate with
- Returns
- true if setting the value was successful.
◆ setTimeToLive()
|
virtual |
Sets the time-to-live/hop count for outgoing multicast packets.
- Parameters
-
ttl the hop count, from 0 to 255
- Returns
- true if setting the value was successful.
◆ timeToLive()
|
virtual |
Retrieves the time-to-live/hop count value on multicast packets being sent.
The documentation for this class was generated from the following file: