Re: Receive problem in SSH (General questions)
Also, I am finding my Received() event does not get fired until I actually make the call to Receive() - this is not very helpful to me.
This should not be happening. However, if you call Sleep and have blocked the thread, then it makes sense since event wasn't fired at all - since nothing was processed due to Sleep.
Finally, I have experimented with calling SetTimeout(5) before calling Receive(), which throws an exception as expected if the server does not have anything to send me, but WODSSH disconnects me!
Ok, this sounds strange, I'll check it out on next few hours. It makes sense to happen due to programming logic (timeout, set by timeout property, did expire...) but doesn't make sense from end-user logic - so this probably needs to be fixed.
I really need to use Receive() instead of WaitFor() or ReceiveLine() since I am getting byte arrays from the server.
WaitFor change will change today also. If it expires, due to timeout, it will not consume everything from the buffer, like it did so far. Perhaps that will help?
What I need is for Receive() to support a model where I need to read a variable amount of data from the server, where the only way I know the server is done sending is when I do not receive any data for about 5 seconds or so.
Ok, so setting Timeout = 5, calling Receive, getting error but NOT disconnecting is the behaviour you expect? Me too - I'll check it out to make it happen.
Complete thread:
- Receive problem in SSH - Jeff, 2006-01-12, 21:59
- Re: Receive problem in SSH - wodSupport, 2006-01-12, 23:13
- Re: Receive problem in SSH - Jeff, 2006-01-13, 00:03
- Re: Receive problem in SSH - wodSupport, 2006-01-13, 00:51
- Re: Receive problem in SSH - Jeff, 2006-01-13, 18:01
- Re: Receive problem in SSH - wodSupport, 2006-01-13, 20:18
- Re: Receive problem in SSH - wodSupport, 2006-01-13, 20:25
- Re: Receive problem in SSH - Jeff, 2006-01-13, 23:10
- Re: Receive problem in SSH - wodSupport, 2006-01-13, 20:25
- Re: Receive problem in SSH - wodSupport, 2006-01-13, 20:18
- Re: Receive problem in SSH - Jeff, 2006-01-13, 18:01
- Re: Receive problem in SSH - wodSupport, 2006-01-13, 00:51
- Re: Receive problem in SSH - Jeff, 2006-01-13, 00:03
- Re: Receive problem in SSH - wodSupport, 2006-01-12, 23:13