something strange in blocking mode - WeOnlyDo Discussion board

something strange in blocking mode (wodSSH / wodSSH.NET)

by fox, Wednesday, February 22, 2006, 08:55 (6647 days ago)

My code perform these actions:

1. Sends something in non-blocking mode via Send method (like 'ls' typed by user);
2. Receives server's answer ( non_block answer ) with OnReceived-notification and detects (manually) that server sends prompt;
3. switches to blocking mode and enables StripANSI;
4. result_one := Execute('ls -la'#13,prompt,timeout);
5. result_two := Execute('pwd'#13,prompt,timeout);
6. switches back to non-blocking mode and disables StripANSI;

The results I got is unstable .

Most of the times it's all ok and I receive the correct info, but sometimes (approx. 1 of 5 tries) the result_one looks like the non_block answer with small differences (and the result isn't stripped from ANSI-sequences) and the result_two is ls -la + CRLF + correct result_one ;

I debug alot but still cannot understand what happens... Could you explain it?


Complete thread: