Guys i'm trying to use SSLStream to test my app and so far it goes well (the client/server auth successfully), but the problem i have is reading:
How to know whether or not i have reached the end?
Microsoft's example with "EOF" simply does not work and i have tried "\r\n\r" comparison, but sometimes with long responses, it cuts out and thus i can only get a portion of the information. How can i read from this stream without knowing how long is the stream itself?
I've also tried comparing the last position of the stream with a variable that keeps the last position of the last loop and this does not work too (when you try to Read, but you've reached the end you get IOException).