/[resiprocate]/main/reTurn/ConnectionManager.hxx
ViewVC logotype

Contents of /main/reTurn/ConnectionManager.hxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8367 - (show annotations) (download)
Tue Dec 16 18:10:49 2008 UTC (10 years, 11 months ago) by sgodin
File MIME type: text/plain
File size: 2329 byte(s)
-update a bunch of license blocks from Vovida 2.0 to BSD-3 clause that were supposed to have been changed months ago
1 #ifndef CONNECTION_MANAGER_HXX
2 #define CONNECTION_MANAGER_HXX
3
4 #include <set>
5 #include <boost/noncopyable.hpp>
6 #include "AsyncSocketBase.hxx"
7
8 namespace reTurn {
9
10 /// Manages open connections so that they may be cleanly stopped when the server
11 /// needs to shut down.
12 class ConnectionManager
13 : private boost::noncopyable
14 {
15 public:
16 /// Add the specified connection to the manager and start it.
17 void start(ConnectionPtr c);
18
19 /// Stop the specified connection.
20 void stop(ConnectionPtr c);
21
22 /// Stop all connections.
23 void stopAll();
24
25 private:
26 /// The managed connections.
27 std::set<ConnectionPtr> mConnections;
28 };
29
30 }
31
32 #endif
33
34
35 /* ====================================================================
36
37 Copyright (c) 2007-2008, Plantronics, Inc.
38 All rights reserved.
39
40 Redistribution and use in source and binary forms, with or without
41 modification, are permitted provided that the following conditions are
42 met:
43
44 1. Redistributions of source code must retain the above copyright
45 notice, this list of conditions and the following disclaimer.
46
47 2. Redistributions in binary form must reproduce the above copyright
48 notice, this list of conditions and the following disclaimer in the
49 documentation and/or other materials provided with the distribution.
50
51 3. Neither the name of Plantronics nor the names of its contributors
52 may be used to endorse or promote products derived from this
53 software without specific prior written permission.
54
55 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
56 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
57 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
58 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
59 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
60 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
61 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
62 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
63 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
64 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
65 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66
67 ==================================================================== */

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27