28 void Open(
const std::string& address, std::uint16_t port,
29 bool isListener =
false);
36 std::chrono::milliseconds timeout,
37 asio::ip::udp::endpoint& remoteEndpoint);
44 const asio::ip::udp::endpoint& targetEndpoint);
54 std::chrono::milliseconds timeout)
override;
61 void Close()
noexcept;
65 [[nodiscard]]
bool IsOpen()
const noexcept;
Synchronous UDP transport used by PROFINET DCE/RPC.
void Close() noexcept
Close the UDP socket.
bool IsOpen() const noexcept
Check whether the socket is open.
asio::io_context & ioContext
void Open(const std::string &address, std::uint16_t port, bool isListener=false)
Open the UDP socket and configure the remote endpoint.
Bytes Receive(std::chrono::milliseconds timeout, asio::ip::udp::endpoint &remoteEndpoint)
Wait for an incoming UDP datagram and capture the sender's endpoint.
void SendTo(const Bytes &data, const asio::ip::udp::endpoint &targetEndpoint)
Send a UDP datagram to a specific remote endpoint.
asio::ip::udp::socket socket
Bytes SendReceive(const Bytes &data, std::chrono::milliseconds timeout) override
Send a UDP datagram and wait for one response.
void Send(const Bytes &data) override
Send a UDP datagram without waiting for a response.
asio::ip::udp::endpoint endpoint
std::vector< std::uint8_t > Bytes
Generic byte buffer alias used throughout the library for raw wire data.
PROFINET protocol wire-format structures and serialization helpers.