use the libevent's noblock function replace defined myself