Archive Index
This month's Index
|
Subject: [ libssh2-Bugs-2141548 ] libssh2_poll detects data on channel, but no data available
[ libssh2-Bugs-2141548 ] libssh2_poll detects data on channel, but no data available
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 15 Apr 2009 07:02:08 +0000
Bugs item #2141548, was opened at 2008-10-02 04:11
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
Simply put, here's the setup. I have a thread that polls for data on a channel every few usec. When the libssh2_poll function detects data available to be read on the channel I'm interested in, I immediately try to read from that channel. Trouble is, if its a small piece of data that I'm expecting, the read fails while subsequent polls still think that there is data there.
So In my SSH client with a pty, I do something like hit the "z" key. This should send a single character over the lines to the remote SSH server plus any SSH/TCP/IP.... overhead. Now the remote SSH server will echo back the key plus any additional terminal formatting.
As soon as I hit my "z" key, libssh2_poll alerts me that data is available to be read from the channel, but attempting to read from the channel doesn't read any data...polling keeps saying theres data, I read nothing... repeat a lot of times...
If I keep hitting keystrokes, eventually the channel read picks up the data. So it seems like libssh2 holds onto small packets for some reason.
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Message:
I suggest we just call it deprecated and tell people to use poll()
Can you (or anyone else) provide a use case where the normal poll() or
----------------------------------------------------------------------
Comment By: Paul Thomas (thomaspu)
Message:
----------------------------------------------------------------------
Comment By: Paul Thomas (thomaspu)
Message:
----------------------------------------------------------------------
You can respond by visiting:
------------------------------------------------------------------------------
|