SSH.NET Peek() hangs - WeOnlyDo Discussion board

SSH.NET Peek() hangs (wodSSH / wodSSH.NET)

by Jasmine, Thursday, February 23, 2017, 22:04 (1197 days ago) @ Tony

Hi Tony.

I double-checked the source. HELPfile is wrong. Peek will block, just like Receive, but not clear out the buffer.

So, this is normal behavior. I would rather not go into asking to change wodSSH.NET, since someone else may use Peek the way it is now. Rather, I would suggest you change your algorithm a bit.

For example, you could set Blocking = False, Peek, Blocking = True? That would not block, but would tell you if there's something on the socket. Or you could use DataReady.

Would that solve your problem?


Complete thread: