revert Merge branch 'main' of http://47.107.152.87:3000/liubiao/APP # Conflicts: # .gitignore # pages/common/index/index.vue # unpackage/dist/dev/app-plus/app-config-service.js # unpackage/dist/dev/app-plus/app-service.js # unpackage/dist/dev/app-plus/app-view.js # unpackage/dist/dev/app-plus/manifest.json # utils/request.js
20 lines
410 B
JavaScript
20 lines
410 B
JavaScript
'use strict'
|
|
var net = require('net')
|
|
|
|
/*
|
|
variables port and host can be removed since
|
|
you have all required information in opts object
|
|
*/
|
|
function buildBuilder (client, opts) {
|
|
var port, host
|
|
opts.port = opts.port || 1883
|
|
opts.hostname = opts.hostname || opts.host || 'localhost'
|
|
|
|
port = opts.port
|
|
host = opts.hostname
|
|
|
|
return net.createConnection(port, host)
|
|
}
|
|
|
|
module.exports = buildBuilder
|