stream.connect(port, host='127.0.0.1')
The specified address with the specified port is specified.
If you want to open a socket, you must use net.createConnection(port, host='127.0.0.1') , http.createServer or smth, like this ... On Linux, to show all sockets listened, enter netstat -an
source share