initial IOWatcher replacement stolen from node_mdns