[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Flushing ssh_channel_write() ?
[Thread Prev] | [Thread Next]
- Subject: Re: Flushing ssh_channel_write() ?
- From: Aris Adamantiadis <aris@xxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 21 Mar 2011 14:11:19 +0100
- To: libssh@xxxxxxxxxx
Hi Jan, It seems to me your patch has been done in reverse (inversion in the diff command ?) In my opinion, the flushing stuff should not bypass the ssh_poll loop. It should look like this: while(buffer_get_rest_len(s->out_buffer) && session->alive){ ssh_handle_packets(); } Aris Le 21/03/11 14:02, Jan Willamowius a écrit : > Hi, > > I would like to propose to add a new function to the API, so an > application can ensure its data gets sent: > int ssh_blocking_flush(ssh_session session) > > Please see the attached patch. > > It would be great if this could be included in the upcoming 0.5 > release. I know its late in the cycle, but since it only adds a > function, it can't break any existing code. > > Regards, > Jan > > > Jan Willamowius wrote: >> Hi, >> >> while implementing my ssh server (with a 0.5 snapshot), I noticed that >> data sent to the client with ssh_channel_write() doesn't seem to be sent >> out immediately. Sometimes it only appears in the client when the client >> presses another key. >> >> Is there a way to flush the data written with ssh_ channel_write() to >> make sure it gets sent ? >> >> samplesshd doesn't have this issue, but my server doesn't enter >> ssh_channel_read immediately after ssh_channel_write(). It only >> does so when the client socket has new data to be read. >> >> Thanks, >> Jan >> >> -- >> Jan Willamowius, jan@xxxxxxxxxxxxxx, http://www.gnugk.org/ >
Re: Flushing ssh_channel_write() ? | Jan Willamowius <jan@xxxxxxxxxxxxxx> |
Re: Flushing ssh_channel_write() ? | Jan Willamowius <jan@xxxxxxxxxxxxxx> |