1//
2// HTTPServerParams.cpp
3//
4// Library: Net
5// Package: HTTPServer
6// Module: HTTPServerParams
7//
8// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
9// and Contributors.
10//
11// SPDX-License-Identifier: BSL-1.0
12//
13
14
15#include "Poco/Net/HTTPServerParams.h"
16
17
18namespace Poco {
19namespace Net {
20
21
22HTTPServerParams::HTTPServerParams():
23 _timeout(60000000),
24 _keepAlive(true),
25 _maxKeepAliveRequests(0),
26 _keepAliveTimeout(15000000)
27{
28}
29
30
31HTTPServerParams::~HTTPServerParams()
32{
33}
34
35
36void HTTPServerParams::setServerName(const std::string& serverName)
37{
38 _serverName = serverName;
39}
40
41
42void HTTPServerParams::setSoftwareVersion(const std::string& softwareVersion)
43{
44 _softwareVersion = softwareVersion;
45}
46
47
48void HTTPServerParams::setTimeout(const Poco::Timespan& timeout)
49{
50 _timeout = timeout;
51}
52
53
54void HTTPServerParams::setKeepAlive(bool keepAlive)
55{
56 _keepAlive = keepAlive;
57}
58
59
60void HTTPServerParams::setKeepAliveTimeout(const Poco::Timespan& timeout)
61{
62 _keepAliveTimeout = timeout;
63}
64
65
66void HTTPServerParams::setMaxKeepAliveRequests(int maxKeepAliveRequests)
67{
68 poco_assert (maxKeepAliveRequests >= 0);
69 _maxKeepAliveRequests = maxKeepAliveRequests;
70}
71
72
73} } // namespace Poco::Net
74