CPU usage with ssh.blocking = true (wodSSH / wodSSH.NET)
hi. Not sure why you get high CPU utilization, but you can always make your own WatiFor which is quite simple actually. Define one global variable:
Global String InData
and then in DataReceived event add this:
InData = InData + SSh1.Receive
if (instr(InData, "your_prompt")) then
"prompt found", remove all up to found data....
do nothing.. wait for more data
so basically you append to your own string until your string is found among all received data. When it's found - do with it whatever you want, clear InData buffer, continue with coding, etc..
This way you can have multiple InStr calls, and have much more control than with our WaitFor.
Would that help?
- CPU usage with ssh.blocking = true - Marc M, 2014-04-12, 00:22
- CPU usage with ssh.blocking = true - wodSupport, 2014-04-12, 01:07