General UDP socket interface.
More...
#include <udpsocket.h>
List of all members.
Public Member Functions |
NetworkLayerProtocol | getProtocol () const |
| Returns the underlying network layer protocol which this socket uses.
|
virtual bool | create (uint16_t portNumber=0, bool obtainDestination=false)=0 |
| Create an UDP socket.
|
virtual bool | create (NetworkLayerAddress &bindAddress, uint16_t portNumber=0, bool obtainDestination=false)=0 |
| Create an UDP socket.
|
virtual bool | destroy ()=0 |
| Destroys the socket.
|
virtual bool | setNonBlocking (bool f=true)=0 |
| Can be used to set the socket in either non-blocking or blocking mode.
|
virtual uint16_t | getLocalPortNumber () const =0 |
| Returns the port number to which the socket is bound.
|
virtual bool | setMulticastTTL (uint8_t ttl)=0 |
| Sets the Time To Live (TTL) field for outgoing multicast packets.
|
Detailed Description
Member Function Documentation
virtual bool nut::UDPSocket::create |
( |
uint16_t |
portNumber = 0 , |
|
|
bool |
obtainDestination = false |
|
) |
| [pure virtual] |
Create an UDP socket.
- Parameters:
-
portNumber | If not zero, the socket will be bound to this port number. |
obtainDestination | If true, the network layer destination address which was stored in the UDP packet will be retrieved. This can come in handy is the packet was sent to a multicast address and your application needs to retrieve this multicast address somehow. Note that this is not supported on all platforms. |
virtual bool nut::UDPSocket::create |
( |
NetworkLayerAddress & |
bindAddress, |
|
|
uint16_t |
portNumber = 0 , |
|
|
bool |
obtainDestination = false |
|
) |
| [pure virtual] |
Create an UDP socket.
- Parameters:
-
bindAddress | The network layer address to which this socket will be bound. |
portNumber | If not zero, the socket will be bound to this port number. |
obtainDestination | If true, the network layer destination address which was stored in the UDP packet will be retrieved. This can come in handy is the packet was sent to a multicast address and your application needs to retrieve this multicast address somehow. Note that this is not supported on all platforms. |
virtual bool nut::UDPSocket::destroy |
( |
| ) |
[pure virtual] |
virtual uint16_t nut::UDPSocket::getLocalPortNumber |
( |
| ) |
const [pure virtual] |
virtual bool nut::UDPSocket::setMulticastTTL |
( |
uint8_t |
ttl | ) |
[pure virtual] |
virtual bool nut::UDPSocket::setNonBlocking |
( |
bool |
f = true | ) |
[pure virtual] |
The documentation for this class was generated from the following file: