libevent change to cpp