tiny code for learning libevent