1//
2// HTTPServer.cpp
3//
4// Library: Net
5// Package: HTTPServer
6// Module: HTTPServer
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/HTTPServer.h"
16#include "Poco/Net/HTTPServerConnectionFactory.h"
17
18
19namespace Poco {
20namespace Net {
21
22
23HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::UInt16 portNumber, HTTPServerParams::Ptr pParams):
24 TCPServer(new HTTPServerConnectionFactory(pParams, pFactory), portNumber, pParams),
25 _pFactory(pFactory)
26{
27}
28
29
30HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, const ServerSocket& socket, HTTPServerParams::Ptr pParams):
31 TCPServer(new HTTPServerConnectionFactory(pParams, pFactory), socket, pParams),
32 _pFactory(pFactory)
33{
34}
35
36
37HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::ThreadPool& threadPool, const ServerSocket& socket, HTTPServerParams::Ptr pParams):
38 TCPServer(new HTTPServerConnectionFactory(pParams, pFactory), threadPool, socket, pParams),
39 _pFactory(pFactory)
40{
41}
42
43
44HTTPServer::~HTTPServer()
45{
46}
47
48
49void HTTPServer::stopAll(bool abortCurrent)
50{
51 stop();
52 _pFactory->serverStopped(this, abortCurrent);
53}
54
55
56} } // namespace Poco::Net
57