aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/poco/Net/src/HTTPServer.cpp
blob: 31aa83d1be2f935e62418540221873f0641a5dc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// HTTPServer.cpp
//
// Library: Net
// Package: HTTPServer
// Module:  HTTPServer
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier:	BSL-1.0
//


#include "Poco/Net/HTTPServer.h"
#include "Poco/Net/HTTPServerConnectionFactory.h"


namespace Poco {
namespace Net {


HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::UInt16 portNumber, HTTPServerParams::Ptr pParams):
	TCPServer(new HTTPServerConnectionFactory(pParams, pFactory), portNumber, pParams),
	_pFactory(pFactory)
{
}


HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, const ServerSocket& socket, HTTPServerParams::Ptr pParams):
	TCPServer(new HTTPServerConnectionFactory(pParams, pFactory), socket, pParams),
	_pFactory(pFactory)
{
}


HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::ThreadPool& threadPool, const ServerSocket& socket, HTTPServerParams::Ptr pParams):
	TCPServer(new HTTPServerConnectionFactory(pParams, pFactory), threadPool, socket, pParams),
	_pFactory(pFactory)
{
}


HTTPServer::~HTTPServer()
{
}


void HTTPServer::stopAll(bool abortCurrent)
{
	stop();
	_pFactory->serverStopped(this, abortCurrent);
}


} } // namespace Poco::Net