#include <CECNHandler.hpp>
|
boost::asio::ip::udp::socket & | GetSocket () |
| Gets the listener socket. More...
|
|
void | ScheduleListen () |
|
void | Start (boost::asio::ip::udp::endpoint &endpoint) |
| Bind the listener to the specified endpoint and listen for datagrams. More...
|
|
void | Stop () |
| Stop any current async read and close the socket. More...
|
|
|
| CECNHandler () |
| Private constructor for the singleton instance. More...
|
|
void | HandleRead (const boost::system::error_code &e, std::size_t bytes_transferred) |
| Handle completion of a read operation. More...
|
|
freedm::broker::CECNHandler::CECNHandler |
( |
| ) |
|
|
private |
CECNHandler::CECNHandler
- Description:
- Constructor. Creates the socket that will be used to listen for incoming messages.
- Precondition:
- None.
- Postcondition:
- A socket is created using the Broker's io service.
boost::asio::ip::udp::socket& freedm::broker::CECNHandler::GetSocket |
( |
| ) |
|
|
inline |
void freedm::broker::CECNHandler::HandleRead |
( |
const boost::system::error_code & |
e, |
|
|
std::size_t |
bytes_transferred |
|
) |
| |
|
private |
CECNHandler::HandleRead
- Description:
- The callback which accepts messages from the remote sender.
- Parameters
-
e | The errorcode if any associated. |
bytes_transferred | The size of the datagram being read. |
- Precondition:
- The connection has had start called and some message has been placed in the buffer by the receive call.
- Postcondition:
- The ECN message is processed and converted to a DGI style message and passed to the DGI processes.
CECNHandler & freedm::broker::CECNHandler::Instance |
( |
| ) |
|
|
static |
void freedm::broker::CECNHandler::ScheduleListen |
( |
| ) |
|
CECNHandler::ScheduleListen
- Description:
- Makes a call to the Broker's ioservice and requests that the HandleRead function is called when a datagram arrives on the Listener's socket.
- Precondition:
- The m_socket is bound to an endpoint
- Postcondition:
- HandleRead will be called when a datagram arrives at the socket
void freedm::broker::CECNHandler::Start |
( |
boost::asio::ip::udp::endpoint & |
endpoint | ) |
|
CECNHandler::Start
- Description:
- Causes the listener to start listening for new messages
- Precondition:
- endpoint is a valid endpoint for the lister to listen on
- Postcondition:
- The listener is not listening for incoming messages on the socket bound to endpoint
- Parameters
-
endpoint | the endpoint for the listener to listen on |
void freedm::broker::CECNHandler::Stop |
( |
| ) |
|
CECNHandler::Stop
- Description:
- Closes the listening socket.
- Precondition:
- None
- Postcondition:
- The socket used to listen for messages is closed.
boost::asio::ip::udp::endpoint freedm::broker::CECNHandler::m_recv_from |
|
private |
boost::asio::ip::udp::socket freedm::broker::CECNHandler::m_socket |
|
private |
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/freedm/checkouts/opnet-ecn/Broker/src/CECNHandler.hpp
- /home/docs/checkouts/readthedocs.org/user_builds/freedm/checkouts/opnet-ecn/Broker/src/CECNHandler.cpp