putConfigPort(...args)
Applies a JSON configuration (as a buffer) to a single port.
putConfigPort(port, jsonBuf, len)
Parameters
port (number) – Port number
jsonBuf (Buffer) – JSON buffer with config
len (number) – Buffer length
Return value
number (0 = success)
Example JSON
// JSON
{
"port": 60000,
"country": ["US", "CA"],
"state": "California",
"city": "San Francisco",
"zip": "94105",
"isp": "Comcast",
"refresh": true,
"rotation": false
}
Example
// example
const body = Buffer.from(JSON.stringify({ port: 60000, country: ["US", "CA"] }));
sdk.putConfigPort(60000, body, body.length);
Last updated
Was this helpful?