Will only connect to the given addresses. Cannot be called after startup.
551565
public WalletAppKit setPeerNodes(PeerAddress... addresses) {
        checkState(state() == State.NEW, "Cannot call after startup");
        this.peerAddresses = addresses;
        return this;
    }
608820
async function connect(address) {
	const running = await isRunning(address)
	if (!running) {
		throw errCouldNotConnect
	}
	return siadWrapper(address)
}
482951
def reset(self, addresses):
        
        request = self._call(SetEnqueueResetReverseDns.SetEnqueueResetReverseDns, IPs=addresses)
        response = request.commit()
        return response['Success']
1309200
public void setPermittedAddresses(List<DomainMatcher> addrs) {
        if (addrs == null || addrs.isEmpty()) {
            ((HierarchicalConfiguration) getConfig()).clearTree(ADDRESS_KEY);

            this.permittedAddresses = Collections.emptyList();
            this.permittedAddressesEnabled = Collections.emptyList();
            return;
        }

        this.permittedAddresses = new ArrayList<>(addrs);

        ((HierarchicalConfiguration) getConfig()).clearTree(ADDRESS_KEY);

        int size = addrs.size();
        ArrayList<DomainMatcher> enabledAddrs = new ArrayList<>(size);
        for (int i = 0; i < size; ++i) {
            String elementBaseKey = ADDRESS_KEY + "(" + i + ").";
            DomainMatcher addr = addrs.get(i);

            getConfig().setProperty(elementBaseKey + ADDRESS_VALUE_KEY, addr.getValue());
            getConfig().setProperty(elementBaseKey + ADDRESS_REGEX_KEY, addr.isRegex());
            getConfig().setProperty(elementBaseKey + ADDRESS_ENABLED_KEY, addr.isEnabled());

            if (addr.isEnabled()) {
                enabledAddrs.add(addr);
            }
        }

        enabledAddrs.trimToSize();
        this.permittedAddressesEnabled = enabledAddrs;
    }
1116012
def connect(self, *names):
        
        fromName, toName, rest = names[0], names[1], names[2:]
        self.connectAt(fromName, toName)
        if len(rest) != 0:
            self.connect(toName, *rest)
405304
public static Set<InetAddress> resolveLocalAddresses() {
        Set<InetAddress> addrs = new HashSet<InetAddress>();
        Enumeration<NetworkInterface> ns = null;
        try {
            ns = NetworkInterface.getNetworkInterfaces();
        } catch (SocketException e) {
            // ignored...
        }
        while (ns != null && ns.hasMoreElements()) {
            NetworkInterface n = ns.nextElement();
            Enumeration<InetAddress> is = n.getInetAddresses();
            while (is.hasMoreElements()) {
                InetAddress i = is.nextElement();
                if (!i.isLoopbackAddress() && !i.isLinkLocalAddress() && !i.isMulticastAddress()
                        && !isSpecialIp(i.getHostAddress())) addrs.add(i);
            }
        }
        return addrs;
    }
1141208
@Override
    public CompletableFuture<Void> connect(Serializable userid, InetSocketAddress sncpAddr) {
        tryAcquireSemaphore();
        CompletableFuture<Void> future = sncpNodeAddresses.appendSetItemAsync(SOURCE_SNCP_USERID_PREFIX + userid, InetSocketAddress.class, sncpAddr);
        future = future.thenAccept((a) -> sncpNodeAddresses.appendSetItemAsync(SOURCE_SNCP_ADDRS_KEY, InetSocketAddress.class, sncpAddr));
        if (semaphore != null) future.whenComplete((r, e) -> releaseSemaphore());
        if (logger.isLoggable(Level.FINEST)) logger.finest(WebSocketNodeService.class.getSimpleName() + ".event: " + userid + " connect from " + sncpAddr);
        return future;
    }
584353
public synchronized void setInetAddrPort(InetAddrPort address)
    {
        if (_address != null && _address.equals(address)) return;

        if (isStarted()) log.warn(this + " is started");

        _address = address;
    }
893626
public ClientNetworkConfig setAddresses(List<String> addresses) {
        isNotNull(addresses, "addresses");
        addressList.clear();
        addressList.addAll(addresses);
        return this;
    }
1170878
protected synchronized void bind(InetAddress address, int lport)
        throws IOException
    {
       synchronized (fdLock) {
            if (!closePending && (socket == null || !socket.isBound())) {
                NetHooks.beforeTcpBind(fd, address, lport);
            }
        }
        socketBind(address, lport);
        if (socket != null)
            socket.setBound();
        if (serverSocket != null)
            serverSocket.setBound();
    }
777908
void registerAndConnect(SocketChannel sock, InetSocketAddress addr)
            throws IOException {
        selectionKey = sock.register(selector, SelectionKey.OP_CONNECT);

        boolean immediateConnect = sock.connect(addr);
        if(LOGGER.isTraceEnabled()){
            LOGGER.trace("Connect to host=" + addr.getHostName() + ", hostString=" + addr.getHostString() + ", port=" + addr.getPort() + ", all=" + addr.getAddress() + ", local=" + sock.socket().getLocalSocketAddress());
        }
        if (immediateConnect) {
            onConnectSucceeded();
        }


    }
976741
public void join(org.ironjacamar.core.spi.workmanager.Address logicalAddress, org.jgroups.Address address)
   {
      super.join(logicalAddress, address);
   }
979084
public function checkGatewayConnections($addresses_list)
    {
        if (empty($addresses_list)) {
            return;
        }
        foreach ($addresses_list as $addr) {
            if (!isset($this->_waitingConnectGatewayAddresses[$addr])) {
                $this->tryToConnectGateway($addr);
            }
        }
    }
378979
function readSharedAddressPeerAddresses(shared_address, handlePeerAddresses){
	readSharedAddressPeers(shared_address, function(assocNamesByAddress){
		handlePeerAddresses(Object.keys(assocNamesByAddress));
	});
}
6141
def get_connection(self, address):
        

        if self.connections.has_key(address):
            return self.connections[address]
        
        # We need a new datagram socket on a dynamically assigned ephemeral port
        conn = socket.socket(self._forwarding_socket.family,
                             self._forwarding_socket.type,
                             self._forwarding_socket.proto)
        conn.bind((self._forwarding_socket.getsockname()[0], 0))
        conn.connect(self._forwarding_socket.getsockname())
        if not address:
            conn.setblocking(0)
        self.connections[address] = conn
        _logger.debug("Created new connection for address: %s", address)
        return conn
541119
async def _connect_one(self, remote_address):
        '''
        '''
        loop = asyncio.get_event_loop()

        for info in await loop.getaddrinfo(str(self.address.host), self.address.port,
                                           type=socket.SOCK_STREAM):
            # This object has state so is only good for one connection
            client = self.protocol(remote_address, self.auth)
            sock = socket.socket(family=info[0])
            try:
                # A non-blocking socket is required by loop socket methods
                sock.setblocking(False)
                await loop.sock_connect(sock, info[4])
                await self._handshake(client, sock, loop)
                self.peername = sock.getpeername()
                return sock
            except (OSError, SOCKSProtocolError) as e:
                exception = e
                # Don't close the socket because of an asyncio bug
                # see https://github.com/kyuupichan/aiorpcX/issues/8
        return exception
727240
protected ChannelFuture doBooterConnect(InetSocketAddress address,final ChannelHandler init)
	{
		ChannelFuture cf;
		synchronized (booter) {
			if(booter.config().group()==null)
			{
				booterInit();
			}
			final CountDownLatch latch=new CountDownLatch(1);
			ChannelHandler handler=initHandlerAdapter(init);
			booter.handler(handler);
			cf=booter.connect(address);
			cf.addListener(new ChannelFutureListener() {
				@Override
				public void operationComplete(ChannelFuture future) throws Exception {
					log.trace("connect operationComplete:isDone="+future.isDone()+",isSuccess="+future.isSuccess());
					if(future.isDone() && future.isSuccess())
					{
						latch.countDown();
					}
				}
			});
			try {
				latch.await(getConnectTimeOutMills(),TimeUnit.MILLISECONDS);
			} catch (Exception e) {
				log.error(e.getMessage(),e);
			}
		}
		return cf;
	}