Leo 's net capsulation based on libevent.