Function connectLocalIps

Connects to remote IPs and manages socket connections.

Will throw an error if required parameters are missing or if there is an issue connecting to a remote IP.

const options = {
socket,
newProducerMethod: newPipeProducer,
closedProducerMethod: producerClosed,
parameters: connectLocalIpsParameters,
};

connectLocalIps(options)
.then(() => {
console.log('Connected to local IPs');
})
.catch(error => {
console.error('Error connecting to local IPs:', error);
});