Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/net/queuedConnectionManager.h

Go to the documentation of this file.
00001 // Filename: queuedConnectionManager.h
00002 // Created by:  drose (09Feb00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef QUEUEDCONNECTIONMANAGER_H
00020 #define QUEUEDCONNECTIONMANAGER_H
00021 
00022 #include <pandabase.h>
00023 
00024 #include "connectionManager.h"
00025 #include "queuedReturn.h"
00026 
00027 #include <prlock.h>
00028 #include "pdeque.h"
00029 
00030 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, QueuedReturn< PT(Connection) >);
00031 
00032 ////////////////////////////////////////////////////////////////////
00033 //       Class : QueuedConnectionManager
00034 // Description : This flavor of ConnectionManager will queue up all of
00035 //               the reset-connection messages from the
00036 //               ConnectionReaders and ConnectionWriters and report
00037 //               them to the client on demand.
00038 //
00039 //               When a reset connection has been discovered via
00040 //               reset_connection_available()/get_reset_connection(),
00041 //               it is still the responsibility of the client to call
00042 //               close_connection() on that connection to free up its
00043 //               resources.
00044 ////////////////////////////////////////////////////////////////////
00045 class EXPCL_PANDA QueuedConnectionManager : public ConnectionManager,
00046                                 public QueuedReturn< PT(Connection) > {
00047 PUBLISHED:
00048   QueuedConnectionManager();
00049   ~QueuedConnectionManager();
00050 
00051   bool reset_connection_available() const;
00052   bool get_reset_connection(PT(Connection) &connection);
00053 
00054 protected:
00055   virtual void connection_reset(const PT(Connection) &connection);
00056 };
00057 
00058 #endif

Generated on Fri May 2 00:40:36 2003 for Panda by doxygen1.3