an event wrapper for http.createServer/https.createServer