Panda3D
cfChannel.h
1 // Filename: cfChannel.h
2 // Created by: drose (26Mar09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef CFCHANNEL_H
16 #define CFCHANNEL_H
17 
18 #include "pandabase.h"
19 #include "referenceCount.h"
20 #include "bamReader.h"
21 #include "bamWriter.h"
22 #include "cfCommand.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : CFChannel
26 // Description : Represents an open communication channel in the
27 // connected-frame protocol. Commands may be sent and
28 // received on this channel.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_CFTALK CFChannel : public ReferenceCount {
31 public:
32  CFChannel(DatagramGenerator *dggen, DatagramSink *dgsink);
33  ~CFChannel();
34 
35  void send_command(CFCommand *command);
36  PT(CFCommand) receive_command();
37 
38 private:
39  DatagramGenerator *_dggen;
40  DatagramSink *_dgsink;
41  BamReader _reader;
42  BamWriter _writer;
43 };
44 
45 #include "cfChannel.I"
46 
47 #endif
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Definition: bamReader.h:122
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
Definition: bamWriter.h:73
A single command in the Connected-Frame protocol.
Definition: cfCommand.h:32
This class defines the abstract interface to sending datagrams to any target, whether it be into a fi...
Definition: datagramSink.h:32
Represents an open communication channel in the connected-frame protocol.
Definition: cfChannel.h:30
A base class for all things that want to be reference-counted.
This class defines the abstract interace to any source of datagrams, whether it be from a file or fro...