pub unsafe extern "C" fn aeron_subscription_local_sockaddrs(
    subscription: *mut aeron_subscription_t,
    address_vec: *mut aeron_iovec_t,
    address_vec_len: usize,
) -> c_int
Expand description

Get all of the local socket addresses for this subscription. Multiple addresses can occur if this is a multi-destination subscription. Addresses will a string representation in numeric form. IPv6 addresses will be surrounded by ‘[’ and ‘]’ so that the ‘:’ that separate the parts are distinguishable from the port delimiter. E.g. [fe80::7552:c06e:6bf4:4160]:12345. As of writing the maximum length for a formatted address is 54 bytes including the NULL terminator. AERON_CLIENT_MAX_LOCAL_ADDRESS_STR_LEN is defined to provide enough space to fit the returned string. Returned strings will be NULL terminated. If the buffer to hold the address can not hold enough of the message it will be truncated and the last character will be null.

If the address_vec_len is less the total number of addresses available then the first addresses found up to that length will be placed into the address_vec. However the function will return the total number of addresses available so if if that is larger than the input array then the client code may wish to re-query with a larger array to get them all.

@param subscription to query @param address_vec to hold the received addresses @param address_vec_len available length of the vector to hold the addresses @return number of addresses found or -1 if there is an error.