8 #ifndef DIAG_CLIENT_LIB_LIB_DOIP_CLIENT_SOCKETS_UDP_SOCKET_HANDLER_H_
9 #define DIAG_CLIENT_LIB_LIB_DOIP_CLIENT_SOCKETS_UDP_SOCKET_HANDLER_H_
12 #include <string_view>
20 namespace udp_channel {
Class used to create a udp socket for handling transmission and reception of udp message from driver.
PortType
Type of udp port to be used underneath.
Immutable class to store received udp message.
Class type to contains a value (of type ValueType), or an error (of type ErrorType)
Class to manage a udp channel as per DoIP protocol.
Class used to create a udp socket for handling transmission and reception of udp message from driver.
UdpSocketHandler(std::string_view local_ip_address, std::uint16_t port_num, PortType port_type, DoipUdpChannel &channel)
Constructs an instance of UdpSocketHandler.
core_type::Result< void > Transmit(UdpMessageConstPtr udp_message)
Function to transmit the provided udp message.
boost_support::socket::udp::UdpMessagePtr UdpMessagePtr
Type alias for Udp message pointer.
std::uint16_t local_port_num_
Store the local port number.
boost_support::socket::udp::UdpMessageConstPtr UdpMessageConstPtr
Type alias for Udp message const pointer.
std::string local_ip_address_
Store the local ip address.
DoipUdpChannel & channel_
Store the reference to tcp channel.
~UdpSocketHandler()=default
Destruct an instance of UdpSocketHandler.
std::unique_ptr< UdpSocket > udp_socket_
Store the socket object.
void Stop()
Function to stop the socket handler.
void Start()
Function to start the socket handler.
UdpSocket::PortType port_type_
Store the port type.
std::unique_ptr< const UdpMessage > UdpMessageConstPtr
The unique pointer to const UdpMessage.
std::unique_ptr< UdpMessage > UdpMessagePtr
The unique pointer to UdpMessage.