FastLED 3.10.6
Loading...
Searching...
No Matches
port.h
Go to the documentation of this file.
1#pragma once
2
16
17#include "fl/stl/int.h"
18#include "fl/stl/optional.h"
19
20namespace fl {
21namespace net {
22
25constexpr i64 kMinPort = 1;
27constexpr i64 kMaxPort = 65535;
28
37 return fl::nullopt;
38 }
39 return fl::optional<u16>(static_cast<u16>(value));
40}
41
42} // namespace net
43} // namespace fl
constexpr i64 kMaxPort
Highest port representable in the 16-bit wire field.
Definition port.h:27
fl::optional< u16 > tryParsePort(i64 value)
Convert an untrusted integer to a port number.
Definition port.h:35
constexpr i64 kMinPort
Lowest port a caller may request.
Definition port.h:25
constexpr int type_rank< T >::value
Optional< T > optional
Definition optional.h:16
constexpr nullopt_t nullopt
Definition optional.h:13
Base definition for an LED controller.
Definition crgb.hpp:179
fl::i64 i64
Definition stdint.h:221