#include <tdemulticastsocket.h>
Public Member Functions | |
KMulticastSocket (TQObject *parent=0L, const char *name=0L) | |
~KMulticastSocket () | |
KMulticastSocketImpl * | multicastSocketDevice () |
const KMulticastSocketImpl * | multicastSocketDevice () const |
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::KDatagramSocket | |
KDatagramSocket (TQObject *parent=0L, const char *name=0L) | |
virtual | ~KDatagramSocket () |
virtual bool | bind (const TQString &node=TQString::null, const TQString &service=TQString::null) |
virtual bool | bind (const KResolverEntry &entry) |
virtual bool | connect (const TQString &node=TQString::null, const TQString &service=TQString::null) |
virtual bool | connect (const KResolverEntry &entry) |
virtual TQ_LONG | writeBlock (const char *data, TQ_ULONG len, const TDESocketAddress &to) |
virtual KDatagramPacket | receive () |
virtual TQ_LONG | send (const KDatagramPacket &packet) |
Public Member Functions inherited from KNetwork::KClientSocketBase | |
KClientSocketBase (TQObject *parent, const char *name) | |
virtual | ~KClientSocketBase () |
SocketState | state () const |
KResolver & | peerResolver () const |
const KResolverResults & | peerResults () const |
KResolver & | localResolver () const |
const KResolverResults & | localResults () const |
void | setResolutionEnabled (bool enable) |
void | setFamily (int families) |
virtual bool | lookup () |
void | connectToHost (const TQString &host, TQ_UINT16 port) |
virtual bool | disconnect () |
virtual bool | open (int) |
virtual void | close () |
virtual void | flush () |
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 TDESocketAddress | localAddress () const |
virtual TDESocketAddress | peerAddress () const |
bool | emitsReadyRead () const |
virtual void | enableRead (bool enable) |
bool | emitsReadyWrite () const |
virtual void | enableWrite (bool enable) |
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 |
Additional Inherited Members | |
Public Types inherited from KNetwork::KClientSocketBase | |
enum | SocketState { Idle , HostLookup , HostFound , Bound , Connecting , Open , Closing , Unconnected = Bound , Connected = Open , Connection = Open } |
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 } |
Signals inherited from KNetwork::KClientSocketBase | |
void | stateChanged (int newstate) |
void | gotError (int code) |
void | hostFound () |
void | bound (const KResolverEntry &local) |
void | aboutToConnect (const KResolverEntry &remote, bool &skip) |
void | connected (const KResolverEntry &remote) |
void | closed () |
void | readyRead () |
void | readyWrite () |
Static Public Member Functions inherited from KNetwork::TDESocketBase | |
static TQString | errorString (SocketError code) |
static bool | isFatalError (int code) |
Protected Slots inherited from KNetwork::KClientSocketBase | |
virtual void | slotReadActivity () |
virtual void | slotWriteActivity () |
Protected Member Functions inherited from KNetwork::KClientSocketBase | |
virtual bool | setSocketOptions (int opts) |
void | setState (SocketState state) |
virtual void | stateChanging (SocketState newState) |
void | copyError () |
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) |
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.
Definition at line 48 of file tdemulticastsocket.h.
Constructor & Destructor Documentation
◆ KMulticastSocket()
KNetwork::KMulticastSocket::KMulticastSocket | ( | TQObject * | parent = 0L , |
const char * | name = 0L |
||
) |
Constructor.
◆ ~KMulticastSocket()
KNetwork::KMulticastSocket::~KMulticastSocket | ( | ) |
Destructor.
Member Function Documentation
◆ 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.
◆ multicastSocketDevice() [1/2]
KMulticastSocketImpl* KNetwork::KMulticastSocket::multicastSocketDevice | ( | ) |
Returns the multicast socket device in use by this object.
- Note
- The returned object can be null.
◆ multicastSocketDevice() [2/2]
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.
The documentation for this class was generated from the following file: