How to return data line by line - WeOnlyDo Discussion board

How to return data line by line (wodSSH / wodSSH.NET)

by Ernesto Cullen, Wednesday, November 19, 2014, 14:39 (3657 days ago) @ Jasmine

Because ReceiveLine will block if there is no complete line in buffer, while PeekLine raises an exception. If I don't get the exception, I know there is a line in buffer and so I can use ReceiveLine (in later tests I replaced with Receive(length) but it is the same). But even so, I still got blocked sometimes.
Maybe the receive buffer is modified while I am extracting the data? if so, how can I prevent this to happening?


Complete thread: