private SocketAddress getOptionalSourceSocketAddress() { final InetAddress sourceAddress = this.getSourceAddress(); final Integer absoluteSourcePort = this.getAbsoluteSourcePort(); if (sourceAddress == null && absoluteSourcePort == null) { return null; } if (sourceAddress == null) { return new InetSocketAddress(absoluteSourcePort); } return new InetSocketAddress(sourceAddress, absoluteSourcePort); }
private SocketAddress getOptionalSourceSocketAddress() { final InetAddress sourceAddress = this.getSourceAddress(); final Integer absoluteSourcePort = this.getAbsoluteSourcePort(); if (sourceAddress == null && absoluteSourcePort == null) { return null; } if (sourceAddress == null) { return new InetSocketAddress(absoluteSourcePort); } return new InetSocketAddress(sourceAddress, absoluteSourcePort); }
port = binding.getDestinationPort(); host = NetworkUtils.canonize(binding.getUnresolvedDestinationAddress()); if (binding.getSourceAddress() != null) { tc.getParams().put(TransportConstants.LOCAL_ADDRESS_PROP_NAME, NetworkUtils.canonize(binding.getSourceAddress().getHostAddress()));
port = binding.getDestinationPort(); host = NetworkUtils.canonize(binding.getUnresolvedDestinationAddress()); if (binding.getSourceAddress() != null) { tc.getParams().put(TransportConstants.LOCAL_ADDRESS_PROP_NAME, NetworkUtils.canonize(binding.getSourceAddress().getHostAddress()));