make net.connect and net.createConnection interface like node