#include <userver/utest/port_reservation.hpp>
Socket settings for a port reservation.
Definition at line 17 of file port_reservation.hpp.
Public Types | |
| enum class | IpVersion : std::uint8_t { kV4 , kV6 } |
| Address family of the reserved socket. More... | |
| enum class | Protocol : std::uint8_t { kTcp , kUdp } |
| Transport protocol of the reserved socket. More... | |
Public Attributes | |
| IpVersion | ip_version {IpVersion::kV4} |
| Address family. | |
| Protocol | protocol {Protocol::kTcp} |
| Transport protocol. | |
| std::optional< std::uint16_t > | fixed_port {} |
| std::chrono::milliseconds | timeout {std::chrono::seconds{30}} |
| How long to wait for a fixed port. | |
|
strong |
Address family of the reserved socket.
| Enumerator | |
|---|---|
| kV4 | IPv4. |
| kV6 | IPv6. |
Definition at line 19 of file port_reservation.hpp.
|
strong |
Transport protocol of the reserved socket.
| Enumerator | |
|---|---|
| kTcp | TCP. |
| kUdp | UDP. |
Definition at line 25 of file port_reservation.hpp.
| std::optional<std::uint16_t> utest::PortReservationOptions::fixed_port {} |
Nonzero port to reserve. Otherwise the OS assigns a port. Parallel test runs in CI are likely to contend for the same fixed port. Use this option only as a last resort when the subsystem under test does not support configuring its port.
Definition at line 39 of file port_reservation.hpp.
| IpVersion utest::PortReservationOptions::ip_version {IpVersion::kV4} |
Address family.
Definition at line 31 of file port_reservation.hpp.
| Protocol utest::PortReservationOptions::protocol {Protocol::kTcp} |
Transport protocol.
Definition at line 34 of file port_reservation.hpp.
| std::chrono::milliseconds utest::PortReservationOptions::timeout {std::chrono::seconds{30}} |
How long to wait for a fixed port.
Definition at line 42 of file port_reservation.hpp.