[Libevent-users] how to consume partial buffer in bufferevent filter callback

2011-02-08 Thread Wayne Shao
Hi, I am using a filter to read packets from the peer. The packet format is typical header + payload, where total length is encoded in the header. In the filter callback, is it possible to only consume part of the source buffer? e.g, if my protocol packet size is 100 bytes but the source buffer ha

Re: [Libevent-users] bufferevent with openssl server

2011-02-02 Thread Wayne Shao
793 ( and continues ...) On Wed, Feb 2, 2011 at 1:17 PM, Wayne Shao wrote: > I changed it to BUFFEREVENT_SSL_ACCEPTING. The read/write callbacks are > still not invoked. > > Is there an example SSL server anywhere? > > > On Wed, Feb 2, 2011 at 12:44 PM, Nick Mathewson w

Re: [Libevent-users] bufferevent with openssl server

2011-02-02 Thread Wayne Shao
I changed it to BUFFEREVENT_SSL_ACCEPTING. The read/write callbacks are still not invoked. Is there an example SSL server anywhere? On Wed, Feb 2, 2011 at 12:44 PM, Nick Mathewson wrote: > On Wed, Feb 2, 2011 at 2:27 PM, Wayne Shao wrote: > > Hi, > > I tried to setup an

[Libevent-users] bufferevent with openssl server

2011-02-02 Thread Wayne Shao
Hi, I tried to setup an SSL server with libevent. But the read/write callbacks are not invoked after the handshake phase. Please see the code below. Thanks, W Shao The listener callback is as follows: void listener_cb(struct evconnlistener *listener, evutil_socket_t fd, struct sockaddr *