I'm currently working on a client that talk with a SSH server. Everything works well, but, because the server is quite slow to answer, I have to wait for it to send data. I have two choices, and I'd like to have your advice about what is the most efficient way to wait for the server.
Choice #1 :
while (!(ssh_channel_poll(*sshChannel,0)))
;
Choice #2 :
while (!(ssh_channel_poll(*sshChannel,0)))
sleep(1);