mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
b79ead9c84
* Replicate poco into base/poco/ * De-register poco submodule * Build poco from ClickHouse * Exclude poco from stylecheck * Exclude poco from whitespace check * Exclude poco from typo check * Remove x bit from sources/headers (the style check complained) * Exclude poco from duplicate include check * Fix fasttest * Remove contrib/poco-cmake/* * Simplify poco build descriptions * Remove poco stuff not used by ClickHouse * Glob poco sources * Exclude poco from clang-tidy
65 lines
948 B
C++
65 lines
948 B
C++
//
|
|
// TCPServerParams.cpp
|
|
//
|
|
// Library: Net
|
|
// Package: TCPServer
|
|
// Module: TCPServerParams
|
|
//
|
|
// Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#include "Poco/Net/TCPServerParams.h"
|
|
|
|
|
|
namespace Poco {
|
|
namespace Net {
|
|
|
|
|
|
TCPServerParams::TCPServerParams():
|
|
_threadIdleTime(10000000),
|
|
_maxThreads(0),
|
|
_maxQueued(64),
|
|
_threadPriority(Poco::Thread::PRIO_NORMAL)
|
|
{
|
|
}
|
|
|
|
|
|
TCPServerParams::~TCPServerParams()
|
|
{
|
|
}
|
|
|
|
|
|
void TCPServerParams::setThreadIdleTime(const Poco::Timespan& milliseconds)
|
|
{
|
|
_threadIdleTime = milliseconds;
|
|
}
|
|
|
|
|
|
void TCPServerParams::setMaxThreads(int count)
|
|
{
|
|
poco_assert (count > 0);
|
|
|
|
_maxThreads = count;
|
|
}
|
|
|
|
|
|
void TCPServerParams::setMaxQueued(int count)
|
|
{
|
|
poco_assert (count >= 0);
|
|
|
|
_maxQueued = count;
|
|
}
|
|
|
|
|
|
void TCPServerParams::setThreadPriority(Poco::Thread::Priority prio)
|
|
{
|
|
_threadPriority = prio;
|
|
}
|
|
|
|
|
|
} } // namespace Poco::Net
|