Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
"New backend" is a bit of an exaggeration imo. Anyway, what's necessary to know about "boxes" is in backend.h. It's really not that complicated since the user doesn't have to bother with the refcounting intricacies besides setting ref_obj (that's the whole idea with them).
I didn't use ref_obj in the current patch set. After reading the docs, I'm not convinced that it should be used in the Shuffler. Correct choice?
I looked briefly at the shuffler code but couldn't figure out the right place to put the box. Should be the same object that holds the fd, but the callbacks were used in some clever way so it wasn't that straighforward, as I remember.
I put it in the same struct, and removed the fd there. So that should be about right.
What springs to mind, is, is using INIT_FD_CALLBACK_BOX in just the INIT section enough? Or should it be repeated at create time?