[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with simple echo server


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 )


any ideas?, am I doing something wrong?

thank you





Follow-Ups:
Re: Problem with simple echo serverAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org