Panda3D
queuedConnectionManager.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file queuedConnectionManager.h
10  * @author drose
11  * @date 2000-02-09
12  */
13 
14 #ifndef QUEUEDCONNECTIONMANAGER_H
15 #define QUEUEDCONNECTIONMANAGER_H
16 
17 #include "pandabase.h"
18 
19 #include "connectionManager.h"
20 #include "queuedReturn.h"
21 #include "pdeque.h"
22 
23 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_NET, EXPTP_PANDA_NET, QueuedReturn< PT(Connection) >);
24 
25 /**
26  * This flavor of ConnectionManager will queue up all of the reset-connection
27  * messages from the ConnectionReaders and ConnectionWriters and report them
28  * to the client on demand.
29  *
30  * When a reset connection has been discovered via
31  * reset_connection_available()/get_reset_connection(), it is still the
32  * responsibility of the client to call close_connection() on that connection
33  * to free up its resources.
34  */
35 class EXPCL_PANDA_NET QueuedConnectionManager : public ConnectionManager,
36  public QueuedReturn< PT(Connection) > {
37 PUBLISHED:
40 
41  bool reset_connection_available() const;
42  bool get_reset_connection(PT(Connection) &connection);
43 
44 protected:
45  virtual void connection_reset(const PT(Connection) &connection,
46  bool okflag);
47 };
48 
49 #endif
This flavor of ConnectionManager will queue up all of the reset-connection messages from the Connecti...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The primary interface to the low-level networking layer in this package.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the implementation of a family of things that queue up their return values for later retrieva...
Definition: queuedReturn.h:35
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Represents a single TCP or UDP socket for input or output.
Definition: connection.h:29