4#include "Stroika/Foundation/StroikaPreComp.h"
6#include "Stroika/Foundation/Characters/String2Int.h"
25 for (
const String& token : headerValue.Tokenize ({
' ',
','})) {
29 if (kvp[0] ==
"timeout"sv) {
33 else if (kvp[0] ==
"max"sv) {
34 unsigned int maxMsg = Characters::String2Int<unsigned int> (kvp[1]);
39 DbgTrace (
"Keep-Alive header bad: {}"_f, token);
43 DbgTrace (
"Keep-Alive header bad: {}"_f, token);
49optional<KeepAlive> KeepAlive::Merge (
const optional<KeepAlive>& lhs,
const optional<KeepAlive>& rhs)
53 r.fMessages = Memory::NullCoalesce (lhs->fMessages, rhs->fMessages);
54 r.fTimeout = Memory::NullCoalesce (lhs->fTimeout, rhs->fTimeout);
57 return Memory::NullCoalesce (lhs, rhs);
71 sb <<
"Messages: "sv << *fMessages;
74 sb <<
", Timeout: "sv << *fTimeout;
chrono::duration< double > DurationSeconds
chrono::duration<double> - a time span (length of time) measured in seconds, but high precision.
Similar to String, but intended to more efficiently construct a String. Mutable type (String is large...
String is like std::u32string, except it is much easier to use, often much more space efficient,...
A generalization of a vector: a container whose elements are keyed by the natural numbers.
nonvirtual size_t length() const
STL-ish alias for size() - really in STL only used in string, I think, but still makes sense as an al...
nonvirtual String ToString() const
nonvirtual String AsValue() const