[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ssh_select possible improvement?
[Thread Prev] | [Thread Next]
- Subject: Re: ssh_select possible improvement?
- From: Andreas Schneider <asn@xxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Sun, 19 Sep 2010 19:15:53 +0200
- To: libssh@xxxxxxxxxx
On Sunday, September 19, 2010 18:38:20 you wrote: > Hi, Hi Vic, > Recently I just noticed that when I use libssh to establish a ssh shell > connection to the server, key strokes have a latency. I checked the code > and was able to confirm that this is ssh_select() problem. well the ssh_select functions is something we ignored for a long time and we still try to avoid it. It has more bugs than what you describe. I suggest to use channel_poll() instead. > The scenario is that: I have a local file descriptor from a terminal pty > (which receives key strokes) and a ssh channel (which receives data from > server). This is a very typical ssh shell session. So I pass the fd and > the channel to ssh_select() with 1 second timeout. However, if I press a > key, ssh_select will not return immediately, but will only return until > the timeout is passed. If I set timeout to 10 seconds, I will get a huge > latency. > > I am using 0.4.5 (debian squeeze) version, but if you think 0.4.6 could > make any difference, I can try. Please give me some hint before I > actually dig into it. Thanks. Nobody touched this code since a long time. I think it needs to be rewritten completely cause it misses a lot of things. Could you use channel_poll()? -- andreas
Re: ssh_select possible improvement? | Vic Lee <llyzs@xxxxxxx> |
Re: ssh_select possible improvement? | Norbert Kiesel <nkiesel@xxxxxxxxxxxxxxx> |
ssh_select possible improvement? | Vic Lee <llyzs@xxxxxxx> |