How to return data line by line - WeOnlyDo Discussion board

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

by Jasmine, Wednesday, November 19, 2014, 15:12 (1308 days ago) @ Ernesto Cullen

Hi Ernesto.

You should make a choice to use events or use Blocking = True mode, don't use both.

If you use events, then DataReceived event will fire when there's new data arrived, which you can consume. Since you're using Blocking = False in that case, ReceiveLine will also return immediately even if no data is waiting, so this is what you need.

If you use Blocking = True, don't use events, but use ReceiveLine in some loop.

Which option suits you better?


Complete thread: