adapnex::core::UDPConnection::Create
Creates a UDPConnection instance that only sends/receives datagrams to/from the given host and port.
Synopsis
Declared in <adapnex/core/network.h>
static
std::unique_ptr<UDPConnection>
Create(
std::string const& host,
uint16_t port,
Duration timeout = 10s);
Return Value
Returns a valid UDPConnection instance if the connection was successful, nullptr otherwise.
Parameters
| Name | Description |
|---|---|
host |
The hostname or IP address to send to and receive from. |
port |
The port number to send to and receive from. |
timeout |
The maximum duration to wait for the host to be resolved. |
Created with MrDocs