![]() |
DUNE: Uniform Navigational Environment
2.3.2
|
UDP Socket.
Public Member Functions | |
| UDPSocket (void) | |
| ~UDPSocket (void) | |
| void | enableBroadcast (bool value) |
| void | setMulticastTTL (uint8_t ttl=1) |
| void | setMulticastLoop (bool loopback=true) |
| void | joinMulticastGroup (Address group, Address itf=Address::Any) |
| void | bind (uint16_t port=0, Address add=Address::Any, bool reuse=true) |
| int | write (const char *buffer, int len, const Address &addr, uint16_t port) |
| int | read (char *buffer, int len, Address *add=0) |
| void | addToPoll (System::IOMultiplexing &poller) |
| void | delFromPoll (System::IOMultiplexing &poller) |
| bool | wasTriggered (System::IOMultiplexing &poller) |
| DUNE::Network::UDPSocket::UDPSocket | ( | void | ) |
Create an unbound UDP socket.
References DUNE::NotImplemented.
| DUNE::Network::UDPSocket::~UDPSocket | ( | void | ) |
Destroy an UDP socket.
| void DUNE::Network::UDPSocket::addToPoll | ( | System::IOMultiplexing & | poller | ) |
References DUNE::System::IOMultiplexing::add().
| void DUNE::Network::UDPSocket::bind | ( | uint16_t | port = 0, |
| Address | add = Address::Any, |
||
| bool | reuse = true |
||
| ) |
Assign a name to a socket.
References DUNE::Utils::ByteCopy::toBE(), and DUNE::Network::Address::toInteger().
| void DUNE::Network::UDPSocket::delFromPoll | ( | System::IOMultiplexing & | poller | ) |
References DUNE::System::IOMultiplexing::del().
| void DUNE::Network::UDPSocket::enableBroadcast | ( | bool | value | ) |
| void DUNE::Network::UDPSocket::joinMulticastGroup | ( | Address | group, |
| Address | itf = Address::Any |
||
| ) |
References DUNE::Network::Address::toInteger().
| int DUNE::Network::UDPSocket::read | ( | char * | buffer, |
| int | len, | ||
| Address * | add = 0 |
||
| ) |
Receive an UDP datagram, retrieving the address of the source host.
| buffer | destination buffer. |
| len | destination buffer length. |
| add | system specific host address. |
| void DUNE::Network::UDPSocket::setMulticastLoop | ( | bool | loopback = true | ) |
| void DUNE::Network::UDPSocket::setMulticastTTL | ( | uint8_t | ttl = 1 | ) |
| bool DUNE::Network::UDPSocket::wasTriggered | ( | System::IOMultiplexing & | poller | ) |
References DUNE::System::IOMultiplexing::wasTriggered().
| int DUNE::Network::UDPSocket::write | ( | const char * | buffer, |
| int | len, | ||
| const Address & | addr, | ||
| uint16_t | port | ||
| ) |
Send an UDP datagram to a host.
| addr | system specific host address. |
| port | destination port. |
| buffer | buffer to send. |
| len | buffer length. |
References DUNE::Network::Address::str(), DUNE::Utils::ByteCopy::toBE(), and DUNE::Network::Address::toInteger().
