Socket_getPeerAddressStatic

Function Socket_getPeerAddressStatic 

Source
pub unsafe extern "C" fn Socket_getPeerAddressStatic(
    self_: Socket,
    peerAddressString: *mut c_char,
) -> *mut c_char
Expand description

Get the address of the peer application (IP address and port number)

The peer address has to be returned as null terminated string

Implementation of this function is MANDATORY (lib60870 and libiec61850)

§Arguments

  • self - the client, connection or server socket instance
  • peerAddressString - a string to store the peer address (the string should have space for at least 60 characters)

§Returns

the IP address and port number as strings separated by the ‘:’ character. If the address is an IPv6 address the IP part is encapsulated in square brackets.