[Mono-dev] System.Web.Mail and TLS

Vladimir Krasnov vladimirk at mainsoft.com
Mon Mar 27 05:20:05 EST 2006


Hi Gonzalo,

What do you suggest about ReadResponse? Mono SslClientStream does not
inherit from NetworkStream, so how can I know if more data is available
in the stream and calling Read() again cannot be used because it blocks
if no data available.

Vladimir Krasnov

-----Original Message-----
From: mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Gonzalo
Paniagua Javier
Sent: Wednesday, March 22, 2006 12:05 AM
To: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] System.Web.Mail and TLS

On Tue, 2006-03-21 at 10:17 -0800, Vladimir Krasnov wrote:
> Please take a look at this code and suggest what to do.

In ReadResponse (), note that you should be expecting that Read does not
return all the bytes, even if the stream is not a NetworkStream. Also
the way you're building the string from the received bytes might lead to
different strings depending on how Read() behaves (apart from being a
waste of memory). I would rework that part.

-Gonzalo


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list