[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: integration with libevent
[Thread Prev] | [Thread Next]
- Subject: Re: integration with libevent
- From: Stef Bon <stefbon@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Sun, 20 Sep 2015 18:04:08 +0200
- To: libssh@xxxxxxxxxx
Hi, I'm working on a fuse fs, with ssh one of it's backend. I'm trying to make it work using an eventloop for reading the replys from the remote server. So only for reading events, one eventloop, not an eventloop for every thread. The calls to send a request (for file attributes for example) I have to rewrite.Sending the sftp message is the same, but waiting for a reply is different. Right now the calling thread will wait for a reply by reading the channel. In my case I think waiting using pthread_cond_wait (timedwait when using a timeout) is sufficient for the calling threat. The main eventloop will get a reply from the server, will queue it and send a pthread_broadcast to wake up the waiting thread. It's not so easy to implement this. The mainloop will not only get a signal when receiving a reply for the messages send, but also a window adjust message (SSH_MSG_CHANNEL_WINDOW_ADJUST) to name one. When using an external eventloop there is no call to adjust the window for a channel in the api? Stef
Re: integration with libevent | Aris Adamantiadis <aris@xxxxxxxxxxxx> |
integration with libevent | Nicolas Viennot <nicolas@xxxxxxxxxxx> |
Re: integration with libevent | Aris Adamantiadis <aris@xxxxxxxxxxxx> |