Replies

YuriyGulyayev
07 Oct 2015, 20:53

RE:

I do it right and it works. But I am usiure about thread safety.

I'd like Spotware to respond if/why they believe that their sample is thread safe. In particular, if SslStream.Read and SslStream.Write are called concurrently on 2 separate threads.


@YuriyGulyayev

YuriyGulyayev
07 Oct 2015, 18:47

RE:

Unfortunately, the docs doesn't say the same about SslStream. Thread safety of NetworkStream doesn't imply that of SslStream unless SslStream is also designed to be thread safe. And if it is desiged to be thread safe, that is supposed to be reflected in docs. Maybe someone at Microsoft fell asleep at a wrong time...


@YuriyGulyayev

YuriyGulyayev
07 Oct 2015, 01:16

RE:

Thank you for your advice, but it can't work for me because stream.Read must run continuously to receive market data and other messages. And once in a while I need to call stream.Write on another thread to send a message, without interrupting the reading.


@YuriyGulyayev

YuriyGulyayev
10 Sep 2015, 17:23

RE:

It appears to work now. Thanks.


@YuriyGulyayev