[Mono-bugs] [Bug 75687][Nor] Changed - SslClientStream.BeginRead() blocks

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Aug 9 19:36:33 EDT 2005

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sebastien at ximian.com.


--- shadow/75687	2005-08-09 19:05:18.000000000 -0400
+++ shadow/75687.tmp.24155	2005-08-09 19:36:33.000000000 -0400
@@ -212,6 +212,23 @@
 implemented for this class instead of just falling back to
 Stream.BeginRead() which internally calls overriden Read()?
 ------- Additional Comments From dominz at wp.pl  2005-08-09 19:05 -------
 I just looked at svn: Read() is implemented by doing BeginRead() and
 EndRead() instead of the opposite way. That's weird.
+------- Additional Comments From sebastien at ximian.com  2005-08-09 19:36 -------
+weird ? maybe, but it's just like FileStream.Read (that's implemented
+using BeginRead ;-)
+Anyway SslClientStream inherits from Stream (for which BeginRead isn't
+usable). Using the BeginRead from the innerStream isn't possible as
+SSL is record-oriented while a NetworkStream (_if_ it's the
+innerStream begin used) isn't. Anyway it would be impossible to decode
+record using NetworkStream.BeginRead (hence the 2 streams design).
+Also note that you won't have any problems if you're not reading when
+no data is available (which is possible for some protocols like HTTPS).
+I already have some ideas on how to do it. My problem is that they (2
++ some varations) all requires changes that requires a lot of tests
+(as almost all previous bugs couldn't be turn into normal [n]unit tests).

More information about the mono-bugs mailing list