1#ifndef LOADBALANCING_OPTION_H
2#define LOADBALANCING_OPTION_H
36 virtual uint16_t
Length() const noexcept override;
44 uint16_t
Weight() const noexcept;
46 virtual std::vector<uint8_t>
Payload() const override;
53 static std::unique_ptr<LoadBalancingOption>
Deserialize(
54 const std::vector<uint8_t> &payload,
Service load balancing option.
Definition: loadbalancing_option.h:15
virtual std::vector< uint8_t > Payload() const override
Get option payload.
Definition: loadbalancing_option.cpp:25
uint16_t Weight() const noexcept
Get weight.
Definition: loadbalancing_option.cpp:20
constexpr LoadBalancingOption(bool discardable, uint16_t priority, uint16_t weight) noexcept
Constructor.
Definition: loadbalancing_option.h:27
static std::unique_ptr< LoadBalancingOption > Deserialize(const std::vector< uint8_t > &payload, std::size_t &offset, bool discardable)
Deserialize an option payload.
Definition: loadbalancing_option.cpp:35
virtual uint16_t Length() const noexcept override
Get option length.
Definition: loadbalancing_option.cpp:9
uint16_t Priority() const noexcept
Get priority.
Definition: loadbalancing_option.cpp:15
Communication message entry abstract option.
Definition: option.h:37
constexpr Option(OptionType type, bool discardable) noexcept
Constructor.
Definition: option.h:46
@ LoadBalancing
Service instnace load balancing.