MythTV  0.26-pre
Public Member Functions | Private Attributes
MMulticastSocketDevice Class Reference

#include <mmulticastsocketdevice.h>

Inheritance diagram for MMulticastSocketDevice:
MSocketDevice

List of all members.

Public Member Functions

 MMulticastSocketDevice ()
 MMulticastSocketDevice (QString sAddress, quint16 nPort, u_char ttl=0)
virtual ~MMulticastSocketDevice ()
virtual qint64 writeBlock (const char *data, quint64 len, const QHostAddress &host, quint16 port)
virtual QHostAddress address () const
virtual quint16 port () const

Private Attributes

QList< QHostAddress > m_local_addresses
QHostAddress m_address
quint16 m_port
struct ip_mreq m_imr

Detailed Description

Definition at line 45 of file mmulticastsocketdevice.h.


Constructor & Destructor Documentation

Definition at line 48 of file mmulticastsocketdevice.h.

MMulticastSocketDevice::MMulticastSocketDevice ( QString  sAddress,
quint16  nPort,
u_char  ttl = 0 
)

Definition at line 41 of file mmulticastsocketdevice.cpp.

Definition at line 77 of file mmulticastsocketdevice.cpp.


Member Function Documentation

qint64 MMulticastSocketDevice::writeBlock ( const char *  data,
quint64  len,
const QHostAddress &  host,
quint16  port 
) [virtual]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Writes len bytes to the socket from data and returns the number of bytes written. Returns -1 if an error occurred.

This is used for MSocketDevice::Datagram sockets. You must specify the host and port of the destination of the data.

Reimplemented from MSocketDevice.

Definition at line 90 of file mmulticastsocketdevice.cpp.

virtual QHostAddress MMulticastSocketDevice::address ( ) const [inline, virtual]

Returns the address of this socket device. This may be 0.0.0.0 for a while, but is set to something sensible as soon as a sensible value is available.

Reimplemented from MSocketDevice.

Definition at line 64 of file mmulticastsocketdevice.h.

virtual quint16 MMulticastSocketDevice::port ( ) const [inline, virtual]

Returns the port number of this socket device. This may be 0 for a while, but is set to something sensible as soon as a sensible value is available.

Note that Qt always uses native byte order, i.e. 67 is 67 in Qt; there is no need to call htons().

Reimplemented from MSocketDevice.

Definition at line 65 of file mmulticastsocketdevice.h.


Member Data Documentation

QList<QHostAddress> MMulticastSocketDevice::m_local_addresses [private]

Definition at line 68 of file mmulticastsocketdevice.h.

Referenced by writeBlock().

QHostAddress MMulticastSocketDevice::m_address [private]
quint16 MMulticastSocketDevice::m_port [private]

Definition at line 70 of file mmulticastsocketdevice.h.

Referenced by MMulticastSocketDevice(), and port().

struct ip_mreq MMulticastSocketDevice::m_imr [private]

Definition at line 71 of file mmulticastsocketdevice.h.

Referenced by MMulticastSocketDevice(), and ~MMulticastSocketDevice().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends