Read buffer out of waitfor? (General questions)
Is it possible to read the buffer out of waitfor? I see in the docs that waitfor disables receive. Thank you.
by Logan, (6155 days ago)
Is it possible to read the buffer out of waitfor? I see in the docs that waitfor disables receive. Thank you.
by wodDamir , (6155 days ago) @ Logan
Logan,
I don't see anything like that in help file. WaitFor does remove buffer contents if pattern is received, but not if it times out, in which case buffer remains intact.
In that case, you need to ignore the exception and invoke Receive.
Something like this:
[code]ssh1.HostName = xxxx
ssh1.Login = xxxx
ssh1.Password = xxxx
ssh1.Protocol = SSHAuto
ssh1.Blocking = True
ssh1.Connect
On Error Resume Next
Debug.Print ssh1.WaitFor( joe@debian , 5) 'this is an incorrect prompt pattern to simulate the error
MsgBox ssh1.Receive[/code]
Hope this helps.
Regards,
Damba
by Logan, (6154 days ago) @ wodDamir
I'm writing an ASP page and I need to Peek or Recieve but not until a successful WaitFor. Unfortunately WaitFor disables receive as it is collecting the data from the server. I want to response.write the data waitfor is receiving before it finds te string it is waiting for. I have tried various methods including the do while loop in the sample ASP code, but it doesn't work. Any ideas?
by woddrazen , (6154 days ago) @ Logan
Logan,
You need to receive data just after you connect to server or when you are connected and execute some command?
Drazen
by Logan, (6153 days ago) @ woddrazen
I solved this problem with this little bit of code thanks to your help Drazen, you are the best!
ssh.send command & LF
response.write command sent, please wait...<br>
response.flush
do until cmdend = 1
ssh.DataReady = 0
sshoutput = ssh.receive
sshoutput = replace(sshoutput,LF, <br> )
response.write sshoutput
response.flush
if instr(sshoutput, # ) <> 0 then
cmdend = 1
response.write <p>complete...<br>
End if
Loop
...your service has been phenomenal. It's always quick and you are there when I need you.
Thank you for the great customer service ... I am really impressed with the wodSSH ActiveX control.
Thanks! We love your software and your great support!
Congratulations on an excellent product and first rate support!
Thank you very much for the rapid responses. I was a little nervous about dealing with a company that is on a different continent from me. You have proven my concerns to be unfounded.
Thank you for the great customer service ... I am really impressed with the wodSSH ActiveX control.
May I say how nice it is to work with components so complete and self-explanatory that using them in my application is as instinctive as though I wrote them myself?
The people at WeOnlyDo are amazing! ... I always get a super fast response from customer service, and the products are great too. Thanks WeOnlyDo
Your .NET components allow us to blend .NET technology seamlessly with secure communication, and with excellent technical support.
Your customer service was excellent, and I will look at your products in the future for precisely that reason.