[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with simple echo server
[Thread Prev] | [Thread Next]
- Subject: Re: Problem with simple echo server
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 19 May 2017 07:45:25 +0200
- To: libssh@xxxxxxxxxx
On Monday, 15 May 2017 01:27:07 CEST Juan Carlos Sanchez wrote:
> Hi
>
> libssh version 0.7.5 (VS2015 x64)
>
> I have tried to create a simple echo server,
>
> this is my SSH channel data callback:
>
> static int data_function(ssh_session session, ssh_channel channel, void
> *data, uint32_t len, int is_stderr, void *userdata) {
> //write to client
> ssh_channel_write(channel, data, len);
> //mark all as processed
> return len;
> }
>
>
> Everything seems to work fine, I connect via putty, when I write very
> fast, or several keys simultaneously, status of the session changes to
> SSH_SESSION_STATE_ERROR,
>
>
> The cause of this is the funcion
>
> static int bsd_poll(ssh_pollfd_t *fds, nfds_t nfds, int timeout), its
> call wit no events (fds[0].events == 0 )
We created bsd_poll() for Operating Systems which do not offer a poll
function. It might be that there is a bug in that function on Windows.
Aris and I are not Windows developers but we do our best to support it.
I have no idea what the problem is here, I think you have to keep debugging.
Maybe we need to return an error and set errno correctly.
Patches are very welcome.
Andreas
--
Andreas Schneider GPG-ID: CC014E3D
www.cryptomilk.org asn@xxxxxxxxxxxxxx
| Problem with simple echo server | Juan Carlos Sanchez <4plugins@xxxxxxxxx> |