使用net模块 var net = require('net'); var HOST = '127.0.0.1' var client = new net.Socket(); client.connect(PORT, HOST, function () {})
使用net模块