Encoders/decoders should track the connection object
The connection object is a much more appropriate object for the
decoders and encoders to keep track of. Besides the streams, it also
contains state like connection parameters.
diff --git a/common/rfb/Decoder.h b/common/rfb/Decoder.h
index 842491f..870fa80 100644
--- a/common/rfb/Decoder.h
+++ b/common/rfb/Decoder.h
@@ -22,19 +22,19 @@
#include <rfb/Rect.h>
namespace rfb {
- class CMsgReader;
+ class CConnection;
class CMsgHandler;
class Decoder {
public:
- Decoder(CMsgReader* reader);
+ Decoder(CConnection* conn);
virtual ~Decoder();
virtual void readRect(const Rect& r, CMsgHandler* handler)=0;
static bool supported(int encoding);
- static Decoder* createDecoder(int encoding, CMsgReader* reader);
+ static Decoder* createDecoder(int encoding, CConnection* conn);
protected:
- CMsgReader* reader;
+ CConnection* conn;
};
}