setConfigPorts(...args)
Applies multiple port configurations in bulk.
setConfigPorts(jsonBuf, len)
Parameters
jsonBuf (Buffer) – JSON buffer containing multiple configs.
len (number) – Buffer length.
Return Value
number (0 = success)
Example JSON
// JSON
{
"60000": {
"port": 60000,
"country": ["US", "CA"],
"state": "California",
"city": "San Francisco",
"zip": "94105",
"isp": "Comcast",
"refresh": true,
"rotation": false
}
}
Example
// example
callOrThrow(sdk.setConfigPorts, cfg, cfg.length);
Last updated
Was this helpful?