+ class ReadDigestScope
+ {
+ public:
+ ReadDigestScope (std::shared_ptr<Socket> socket);
+ bool check ();
+ private:
+ std::weak_ptr<Socket> _socket;
+ };
+
+ /** After one of these is created everything that is sent from the socket will be
+ * added to a digest. When the DigestScope is destroyed the digest will be sent
+ * from the socket.
+ */
+ class WriteDigestScope
+ {
+ public:
+ WriteDigestScope (std::shared_ptr<Socket> socket);
+ ~WriteDigestScope ();
+ private:
+ std::weak_ptr<Socket> _socket;
+ };
+