The packet source address.
776300
def src_addr(self):
        
        try:
            return socket.inet_ntop(self._af, self.raw[self._src_addr].tobytes())
        except (ValueError, socket.error):
            pass
913715
def my_address_string(self):
        
        addr = getattr(self, 'client_address', ('', None))[0]

        # If listed in proxy_ips, use the X-Forwarded-For header, if present.
        if addr in self.proxy_ips:
            return self.headers.getheader('x-forwarded-for', addr)
        return addr
541547
def addresses
      [get_peername, get_sockname].map do |addr|
        addr ? Socket.unpack_sockaddr_in(addr)[0, 2].reverse.join(':') : 'unknown'
      end
    end
1035937
def address(addr):
    

    if ':' in addr:
        # Using rpartition here means we should be able to support
        # IPv6, but only with a strict syntax
        host, _sep, port = addr.rpartition(':')

        # Convert the port to a number
        try:
            port = int(port)
        except ValueError:
            raise ValueError("invalid port number %r" % port)

        addr = (host, port)

    return addr
1112427
function ourAddresses (peerInfo) {
  const ourPeerId = peerInfo.id.toB58String()
  return peerInfo.multiaddrs.toArray()
    .reduce((ourAddrs, addr) => {
      const peerId = addr.getPeerId()
      addr = addr.toString()
      const otherAddr = peerId
        ? addr.slice(0, addr.lastIndexOf(`/ipfs/${peerId}`))
        : `${addr}/ipfs/${ourPeerId}`
      return ourAddrs.concat([addr, otherAddr])
    }, [])
    .filter(a => Boolean(a))
    .concat(`/ipfs/${ourPeerId}`)
}
146303
public static SourceAddressAttribute createSourceAddressAttribute(
			TransportAddress address) {
		SourceAddressAttribute attribute = new SourceAddressAttribute();

		attribute.setAddress(address);

		return attribute;
	}
252052
def address(self):
        '''
        
        '''
        return self.API.replace(
            'http://{}:{}'.format(
                self._bridge.hostname,
                self._bridge.port
            ), ''
        )
590486
def gprsSuspensionRequest():
    """"""
    a = TpPd(pd=0x6)
    b = MessageType()
    c = Tlli()
    d = RoutingAreaIdentification()
    e = SuspensionCause()
    packet = a / b / c / d / e
    return packet
378979
function readSharedAddressPeerAddresses(shared_address, handlePeerAddresses){
	readSharedAddressPeers(shared_address, function(assocNamesByAddress){
		handlePeerAddresses(Object.keys(assocNamesByAddress));
	});
}
587298
private static String getHostAddress(InetSocketAddress addr) {
    String hostToAppend = "";
    if (addr.isUnresolved()) {
      hostToAppend = addr.getHostName();
    } else {
      hostToAppend = addr.getAddress().getHostAddress();
    }
    return hostToAppend;
  }
1163710
def netloc(self):
        """"""
        if self.port:
            return '%s:%d' % (self.host, self.port)
        return self.host
1056284
function Packet(length) {
    this._index = 0;
    if (length instanceof Buffer) {
        this.buf = length;
    } else {
        this.buf = Buffer.alloc(length, 0);

        this.writeInt32LE(length);
    }
}
654409
def fake_getaddrinfo(
        host, port, family=None, socktype=None, proto=None, flags=None):
    """"""
    return [(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP,
             '', (host, port))]
365968
public static String toAddressString(InetSocketAddress address) {
        if (address == null) {
            return StringUtils.EMPTY;
        } else {
            return toIpString(address) + ":" + address.getPort();
        }
    }
371052
def registration_packet(self):
        

        return (self.hw_type, self.api_info[0], self.api_info[1], self.name, self.fw_info[0], self.fw_info[1], self.fw_info[2],
                self.exec_info[0], self.exec_info[0], self.exec_info[0], self.slot, self.unique_id)
25089
private void handleIncomingPacket(DatagramPacket packet) {
    SsdpResponse response = new ResponseParser().parse(packet);
    if (response == null) {
      // Unknown to protocol
      return;
    }
    if (response.getType().equals(SsdpResponse.Type.DISCOVERY_RESPONSE)) {
      handleDiscoveryResponse(response);
    } else if (response.getType().equals(SsdpResponse.Type.PRESENCE_ANNOUNCEMENT)) {
      handlePresenceAnnouncement(response);
    }
  }
1309140
function(req) {
      if (req.connection && req.connection.remoteAddress) {
        return {
          ip: req.connection.remoteAddress,
          port: req.connection.remotePort
        };
      }

      if (req.socket && req.socket.remoteAddress) {
        return {
          ip: req.socket.remoteAddress,
          port: req.socket.remotePort
        };
      }

      return {
        ip: '0.0.0.0',
        port: 'n/a'
      };
    }