#include <DatagramSocket.h>
List of all members.
Detailed Description
The datagram socket implements a UDP socket client or server. The UDP is a connection less communication sending messages from client to server.
Constructor & Destructor Documentation
| TDatagramSocket::TDatagramSocket |
( |
TIPAddress & |
rBindingAddress ) |
|
Creates a server socket
- Parameters:
-
| rBindingAddress | : address to bind to |
| TDatagramSocket::TDatagramSocket |
( |
const TString & |
rstrBindingAddr, |
|
|
Uint |
uiBindingPort |
|
) |
| |
Creates a server socket
- Parameters:
-
| rstrBindingAddr | : address or name of the server |
| uiBindingPort | : Listening port |
| TDatagramSocket::TDatagramSocket |
( |
) |
[protected] |
Hidden constructor. Not used for datagram sockets
| TDatagramSocket::TDatagramSocket |
( |
Int |
iFD, |
|
|
struct sockaddr_in & |
rAddress |
|
) |
| [protected] |
Hidden constructor. Not used for datagram sockets
| TDatagramSocket::~TDatagramSocket |
( |
) |
[protected, virtual] |
Member Function Documentation
| Retval TDatagramSocket::connect |
( |
) |
[virtual] |
| bool zeus::TDatagramSocket::isBroadcasting |
( |
) |
const [inline] |
Checks if the broadcasting flag is set
- Return values:
-
| true | : broadcasting is set |
| false,: | no broadcasting is set |
| void TDatagramSocket::openSocket |
( |
) |
[protected, virtual] |
Receives the data from the socket. This method can only be used if a the connect() method has been called successfully. This means that only datagram sockets bound to an address can receive data.
- Parameters:
-
| rData | : return parameter of the data buffer |
- Returns:
- see TAbstractSocket::getErrorCode()
Sends data to a UDP socket to a specific address
- Parameters:
-
| rData | : data buffer to read |
| rAddress | : Address of the receiver |
- Returns:
- see TAbstractSocket::getErrorCode()
| void zeus::TDatagramSocket::setBroadcast |
( |
bool |
bMode ) |
[inline] |
Sets the broadcasting mode
The documentation for this class was generated from the following files: