| 
    Diag-Client-Lib
    
   | 
 
Client connection class used to handle transmission and reception of udp message from socket. More...
#include <udp_connection.h>
Public Types | |
| using | UdpMessage = typename Socket::UdpMessage | 
| Type alias for Udp message.  More... | |
| using | UdpMessagePtr = typename Socket::UdpMessagePtr | 
| Type alias for Udp message pointer.  More... | |
| using | UdpMessageConstPtr = typename Socket::UdpMessageConstPtr | 
| Type alias for Udp message const pointer.  More... | |
| using | HandlerRead = std::function< void(UdpMessagePtr)> | 
| Tcp function template used for reception.  More... | |
Public Member Functions | |
| UdpConnection (Socket socket) noexcept | |
| Constructs an instance of UdpConnection.  More... | |
| UdpConnection (const UdpConnection &other) noexcept=delete | |
| Deleted copy assignment and copy constructor.  More... | |
| UdpConnection & | operator= (const UdpConnection &other) &noexcept=delete | 
| UdpConnection (UdpConnection &&other) noexcept=default | |
| Move assignment and move constructor.  More... | |
| UdpConnection & | operator= (UdpConnection &&other) &noexcept=default | 
| ~UdpConnection () noexcept=default | |
| Destruct an instance of UdpConnection.  More... | |
| void | SetReadHandler (HandlerRead read_handler) | 
| Function to set the read handler that is invoked when message is received.  More... | |
| void | Initialize () noexcept | 
| Initialize the client.  More... | |
| void | DeInitialize () noexcept | 
| De-initialize the client.  More... | |
| core_type::Result< void > | Transmit (UdpMessageConstPtr message) noexcept | 
| Function to trigger transmission.  More... | |
Private Attributes | |
| Socket | socket_ | 
| Store socket used for reading and writing tcp message.  More... | |
Client connection class used to handle transmission and reception of udp message from socket.
| Socket | The type of socket to read and write from/to | 
Definition at line 26 of file udp_connection.h.
| using boost_support::connection::udp::UdpConnection< Socket >::HandlerRead = std::function<void(UdpMessagePtr)> | 
Tcp function template used for reception.
Definition at line 46 of file udp_connection.h.
| using boost_support::connection::udp::UdpConnection< Socket >::UdpMessage = typename Socket::UdpMessage | 
Type alias for Udp message.
Definition at line 31 of file udp_connection.h.
| using boost_support::connection::udp::UdpConnection< Socket >::UdpMessageConstPtr = typename Socket::UdpMessageConstPtr | 
Type alias for Udp message const pointer.
Definition at line 41 of file udp_connection.h.
| using boost_support::connection::udp::UdpConnection< Socket >::UdpMessagePtr = typename Socket::UdpMessagePtr | 
Type alias for Udp message pointer.
Definition at line 36 of file udp_connection.h.
      
  | 
  inlineexplicitnoexcept | 
Constructs an instance of UdpConnection.
| [in] | socket | The socket used for read and writing messages | 
Definition at line 54 of file udp_connection.h.
      
  | 
  deletenoexcept | 
Deleted copy assignment and copy constructor.
      
  | 
  defaultnoexcept | 
Move assignment and move constructor.
      
  | 
  defaultnoexcept | 
Destruct an instance of UdpConnection.
      
  | 
  inlinenoexcept | 
De-initialize the client.
Definition at line 92 of file udp_connection.h.
References boost_support::connection::udp::UdpConnection< Socket >::socket_.
Referenced by boost_support::client::udp::UdpClient::UdpClientImpl::DeInitialize().

      
  | 
  inlinenoexcept | 
Initialize the client.
Definition at line 84 of file udp_connection.h.
References boost_support::connection::udp::UdpConnection< Socket >::socket_.
Referenced by boost_support::client::udp::UdpClient::UdpClientImpl::Initialize().

      
  | 
  deletenoexcept | 
      
  | 
  defaultnoexcept | 
      
  | 
  inline | 
Function to set the read handler that is invoked when message is received.
The ownership of provided read handler is moved
| [in] | read_handler | The handler to be set | 
Definition at line 79 of file udp_connection.h.
References boost_support::connection::udp::UdpConnection< Socket >::socket_.
Referenced by boost_support::client::udp::UdpClient::UdpClientImpl::SetReadHandler().

      
  | 
  inlinenoexcept | 
Function to trigger transmission.
| [in] | message | The udp message to be transmitted | 
Definition at line 100 of file udp_connection.h.
References core_type::Result< T, E >::FromValue(), boost_support::error_domain::kSocketError, boost_support::error_domain::MakeErrorCode(), and boost_support::connection::udp::UdpConnection< Socket >::socket_.
Referenced by boost_support::client::udp::UdpClient::UdpClientImpl::Transmit().


      
  | 
  private | 
Store socket used for reading and writing tcp message.
Definition at line 112 of file udp_connection.h.
Referenced by boost_support::connection::udp::UdpConnection< Socket >::DeInitialize(), boost_support::connection::udp::UdpConnection< Socket >::Initialize(), boost_support::connection::udp::UdpConnection< Socket >::SetReadHandler(), and boost_support::connection::udp::UdpConnection< Socket >::Transmit().