Execute / send questions (C++) (General questions)
Environment: WodSsh.dll 2.4.1, c++(visual studio.net 2005), Win XP
Hi,
I have an application that does not know the prompt in advance and I need to find out the prompt before I do an Execute.
After all the WodSSh initializations I use the Send command like this: objSsh->Send( echo
);
Then I call the Receive command to get the string sent back.
From what I see... if I am debugging the program through VS then Receive gets me the entire response. For example: echo <crlf> bash-2.05$
But if I run the exe directly from the command line the Receive command only returns echo <crlf> !!
But if I put a _sleep(1000) it works (as the machines are in a local LAN). There is something fishy with the Receive method.
This is a surprising behavior as I thought Receive blocked till the entire string is received from the server. (I have set blocking = true).
Please advice how to fix this problem or if you have any sample code that can extract prompts from a response.
Thanks
Arun
Complete thread:
- Execute / send questions (C++) - Arun, 2006-07-13, 22:01
- Re: Execute / send questions (C++) - wodDrazen, 2006-07-13, 22:16
- Re: Execute / send questions (C++) - Arun, 2006-07-13, 22:50
- Re: Execute / send questions (C++) - wodDrazen, 2006-07-13, 22:16