[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] bufferevent with custom IO
On 10.09.2012 16:51, Nick Mathewson wrote:
> Having new *connect_hostname commands is making me think that maybe
> this should be an abstract method of bufferevent that only some
> bufferevent subtypes support.
Yes, the whole "lookup-and-start-connecting" part should be refactored
to a common method.
> I'd like a better distinction between functions that should be called
> by the implementation, and functions that exist to be called by the
> users of this type. Right now I am pretty sure which are which, but
> only pretty sure.
How would you like to separate this? Would a dedicated prefix/suffix
for methods to be used by the implementation work?
> It could be cool to have a way to version the API.
I see, we could add a field to the "bufferevent_indirect_callbacks"
that specifies the version number or a bitmask of the available
features.
> I'm also with Mark Ellzey in that I'd like to see a quick example of
> how this would get used (that is to say, a little example module).
Here is a quick-hacked pseudo-code example of how this could be used:
https://gist.github.com/3691934
Joachim
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.