Broken Response in Asyncronous Connection - WeOnlyDo Discussion board

Broken Response in Asyncronous Connection (wodSSH / wodSSH.NET)

by wodSupport, Thursday, December 11, 2014, 16:37 (1079 days ago) @ Mike D

Mike,

hi. It's normal buffer is 'fragmented'. As data arrives, we provide it to the application. You cannot know how much data is sent in each packet, since this all depends on the server.

You should queue it by yourself in the buffer, and then use when it's suitable for you. That is, for example, how our WaitFor method works.

So, instead of

Debug.print Ssh1.Receive

you should do

a = a + Ssh1.Receive

and then check variable a which contains full received data for some string that should appear inside (such as command prompt).

In any case, that's normal. SSH protocol (or Telnet protocol) don't know about 'buffering' or 'command execution' or something similar. It known only about data flying over from one side to another. Higher logic (bash, command.exe, sh, etc) takes care of using it as commands and their responses.

Best regards,
Kreso


Complete thread: