1//
2// TCPServerParams.cpp
3//
4// Library: Net
5// Package: TCPServer
6// Module: TCPServerParams
7//
8// Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH.
9// and Contributors.
10//
11// SPDX-License-Identifier: BSL-1.0
12//
13
14
15#include "Poco/Net/TCPServerParams.h"
16
17
18namespace Poco {
19namespace Net {
20
21
22TCPServerParams::TCPServerParams():
23 _threadIdleTime(10000000),
24 _maxThreads(0),
25 _maxQueued(64),
26 _threadPriority(Poco::Thread::PRIO_NORMAL)
27{
28}
29
30
31TCPServerParams::~TCPServerParams()
32{
33}
34
35
36void TCPServerParams::setThreadIdleTime(const Poco::Timespan& milliseconds)
37{
38 _threadIdleTime = milliseconds;
39}
40
41
42void TCPServerParams::setMaxThreads(int count)
43{
44 poco_assert (count > 0);
45
46 _maxThreads = count;
47}
48
49
50void TCPServerParams::setMaxQueued(int count)
51{
52 poco_assert (count >= 0);
53
54 _maxQueued = count;
55}
56
57
58void TCPServerParams::setThreadPriority(Poco::Thread::Priority prio)
59{
60 _threadPriority = prio;
61}
62
63
64} } // namespace Poco::Net
65