[Box Backup-commit] COMMIT r3496 - box/trunk/lib/server

subversion at boxbackup.org subversion at boxbackup.org
Fri Dec 26 23:16:52 GMT 2014


Author: chris
Date: 2014-12-26 23:16:52 +0000 (Fri, 26 Dec 2014)
New Revision: 3496

Modified:
   box/trunk/lib/server/SocketStream.h
   box/trunk/lib/server/WinNamedPipeStream.h
Log:
Add comment about reason for code duplication.

The mysterious case of the missing Write(const std::string&) in the
night-time, or rather in subclasses of IOStream which declares it.

Modified: box/trunk/lib/server/SocketStream.h
===================================================================
--- box/trunk/lib/server/SocketStream.h	2014-12-26 23:16:49 UTC (rev 3495)
+++ box/trunk/lib/server/SocketStream.h	2014-12-26 23:16:52 UTC (rev 3496)
@@ -50,11 +50,14 @@
 	virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite);
 	virtual void Write(const void *pBuffer, int NBytes,
 		int Timeout = IOStream::TimeOutInfinite);
+
+	// Why not inherited from IOStream?
 	virtual void Write(const std::string& rBuffer,
 		int Timeout = IOStream::TimeOutInfinite)
 	{
 		IOStream::Write(rBuffer, Timeout);
 	}
+
 	virtual void Close();
 	virtual bool StreamDataLeft();
 	virtual bool StreamClosed();

Modified: box/trunk/lib/server/WinNamedPipeStream.h
===================================================================
--- box/trunk/lib/server/WinNamedPipeStream.h	2014-12-26 23:16:49 UTC (rev 3495)
+++ box/trunk/lib/server/WinNamedPipeStream.h	2014-12-26 23:16:52 UTC (rev 3496)
@@ -45,6 +45,13 @@
 	virtual bool StreamDataLeft();
 	virtual bool StreamClosed();
 
+	// Why not inherited from IOStream?
+	virtual void Write(const std::string& rBuffer,
+		int Timeout = IOStream::TimeOutInfinite)
+	{
+		IOStream::Write(rBuffer, Timeout);
+	}
+
 protected:
 	void MarkAsReadClosed()  {mReadClosed  = true;}
 	void MarkAsWriteClosed() {mWriteClosed = true;}




More information about the Boxbackup-commit mailing list