Libevent revise api