0
我有一個簡單的例子:如何將變量傳遞給回調函數?
for (i in dbs) {
var db = dbs[i].split(':')
var port = dbs[i][0]
var host = dbs[i][0]
var client = redis.createClient(port, host)
tasks = [ [ "info" ] ]
client.multi(tasks).exec(function (err, replies) {
console.log(port)
})
如何打印爲每個客戶端corrent端口連接?