Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
KeepAlive.h
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#ifndef _Stroika_Foundation_IO_Network_HTTP_KeepAlive_h_
5#define _Stroika_Foundation_IO_Network_HTTP_KeepAlive_h_ 1
6
7#include "Stroika/Foundation/StroikaPreComp.h"
8
10
11/**
12 */
13
15
16 using Characters::String;
17
18 /**
19 * https://tools.ietf.org/html/rfc2068#section-19.7.1.1
20 * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive
21 */
22 struct KeepAlive {
23 optional<unsigned int> fMessages;
24 optional<Time::DurationSeconds> fTimeout;
25
26 /**
27 */
28 static KeepAlive Parse (const String& headerValue);
29
30 static optional<KeepAlive> Merge (const optional<KeepAlive>& lhs, const optional<KeepAlive>& rhs);
31
32 /**
33 * As 'header' value
34 */
35 nonvirtual String AsValue () const;
36
37 /**
38 * @see Characters::ToString ();
39 */
40 nonvirtual String ToString () const;
41 };
42
43}
44
45/*
46 ********************************************************************************
47 ***************************** Implementation Details ***************************
48 ********************************************************************************
49 */
50#include "KeepAlive.inl"
51
52#endif /*_Stroika_Foundation_IO_Network_HTTP_KeepAlive_h_*/
String is like std::u32string, except it is much easier to use, often much more space efficient,...
Definition String.h:201