Panda3D
 All Classes Functions Variables Enumerations
cfChannel.h
00001 // Filename: cfChannel.h
00002 // Created by:  drose (26Mar09)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef CFCHANNEL_H
00016 #define CFCHANNEL_H
00017 
00018 #include "pandabase.h"
00019 #include "referenceCount.h"
00020 #include "bamReader.h"
00021 #include "bamWriter.h"
00022 #include "cfCommand.h"
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : CFChannel
00026 // Description : Represents an open communication channel in the
00027 //               connected-frame protocol.  Commands may be sent and
00028 //               received on this channel.
00029 ////////////////////////////////////////////////////////////////////
00030 class EXPCL_CFTALK CFChannel : public ReferenceCount {
00031 public:
00032   CFChannel(DatagramGenerator *dggen, DatagramSink *dgsink);
00033   ~CFChannel();
00034 
00035   void send_command(CFCommand *command);
00036   PT(CFCommand) receive_command();
00037 
00038 private:
00039   DatagramGenerator *_dggen;
00040   DatagramSink *_dgsink;
00041   BamReader _reader;
00042   BamWriter _writer;
00043 };
00044 
00045 #include "cfChannel.I"
00046 
00047 #endif
 All Classes Functions Variables Enumerations