Main Page | Class Hierarchy | Class List | File List | Class Members

SST::UdpSocket Class Reference

Main class representing a UDP socket running our transport protocol. More...

#include <sock.h>

Inheritance diagram for SST::UdpSocket:

SST::Socket List of all members.

Public Member Functions

 UdpSocket (SocketHostState *host, QObject *parent=NULL)
bool bind (const QHostAddress &addr=QHostAddress::Any, quint16 port=0, QUdpSocket::BindMode mode=QUdpSocket::DefaultForPlatform)
 Bind this UDP socket to a port and activate it if successful.

bool send (const Endpoint &ep, const char *data, int size)
 Send a packet on this socket.

QList< Endpoint > localEndpoints ()
 Find all known local endpoints referring to this socket.

quint16 localPort ()
QString errorString ()
 Return a description of any error detected on bind() or send().


Detailed Description

Main class representing a UDP socket running our transport protocol.


Member Function Documentation

bool UdpSocket::bind const QHostAddress &  addr = QHostAddress::Any,
quint16  port = 0,
QUdpSocket::BindMode  mode = QUdpSocket::DefaultForPlatform
[virtual]
 

Bind this UDP socket to a port and activate it if successful.

Parameters:
addr the address to bind to, normally QHostAddress::Any.
port the port to bind to, 0 for any port.
mode how to bind the socket - see QUdpSocket::BindMode.

Implements SST::Socket.

QList< Endpoint > UdpSocket::localEndpoints  )  [virtual]
 

Find all known local endpoints referring to this socket.

Returns:
a list of Endpoint objects.

Implements SST::Socket.

bool UdpSocket::send const Endpoint &  ep,
const char *  data,
int  size
[virtual]
 

Send a packet on this socket.

Parameters:
ep the destination address to send the packet to
msg the packet data
Returns:
true if send was successful

Implements SST::Socket.


The documentation for this class was generated from the following files:
Generated on Wed Mar 28 11:48:05 2007 for SST by doxygen 1.3.4