On Fri, Sep 04, 2015 at 05:43:02PM +0530, Krishnan Parthasarathi wrote: > Hi all, > > We are using libevent (libevent 2.0.22-1) for our lightweight RPC > library[1] on top of libevent.
Hi Krishnan, Could you try libevent 2.1 (maybe you could event try libevent latest from git), while I will look at your client/server. Thanks, Azat. > The RPC implementation is length-encoded, i.e the first 8 bytes of the > message > contains the length of the message. We use filtered bufferevents to wait > until > an entire message is 'pulled-up' into the input buffer before the read > callback > is called. While doing the above we face the following issue, > > The test client code[2] performs 'N' bufferevent_write() calls before > calling > event_base_dispatch(). With instrumentation, I observed that test server[3] > receives 'N' calls to read filter callback, each returning BEV_OK but the > read > call back registered on the accepted connection was called only once. Am I > missing something? Could someone point me how to debug this further? > > > [1] - https://github.com/krisis/pbrpc <https://github.com/kshlm/pbrpc> > [2] - https://github.com/krisis/pbrpc/blob/pbrpc-C-API/tests/client.c > <https://github.com/kshlm/pbrpc/blob/master/tests/client.c> > [3] - https://github.com/krisis/pbrpc/blob/pbrpc-C-API/tests/server.c *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
