1 | // |
---|---|
2 | // TCPServerConnection.cpp |
3 | // |
4 | // Library: Net |
5 | // Package: TCPServer |
6 | // Module: TCPServerConnection |
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/TCPServerConnection.h" |
16 | #include "Poco/Exception.h" |
17 | #include "Poco/ErrorHandler.h" |
18 | |
19 | |
20 | using Poco::Exception; |
21 | using Poco::ErrorHandler; |
22 | |
23 | |
24 | namespace Poco { |
25 | namespace Net { |
26 | |
27 | |
28 | TCPServerConnection::TCPServerConnection(const StreamSocket& socket): |
29 | _socket(socket) |
30 | { |
31 | } |
32 | |
33 | |
34 | TCPServerConnection::~TCPServerConnection() |
35 | { |
36 | } |
37 | |
38 | |
39 | void TCPServerConnection::start() |
40 | { |
41 | try |
42 | { |
43 | run(); |
44 | } |
45 | catch (Exception& exc) |
46 | { |
47 | ErrorHandler::handle(exc); |
48 | } |
49 | catch (std::exception& exc) |
50 | { |
51 | ErrorHandler::handle(exc); |
52 | } |
53 | catch (...) |
54 | { |
55 | ErrorHandler::handle(); |
56 | } |
57 | } |
58 | |
59 | |
60 | } } // namespace Poco::Net |
61 |