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

Re: integration with libevent


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

Follow-Ups:
Re: integration with libeventAris Adamantiadis <aris@xxxxxxxxxxxx>
References:
integration with libeventNicolas Viennot <nicolas@xxxxxxxxxxx>
Re: integration with libeventAris Adamantiadis <aris@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org