In the following example, lrs_get_socket_attrib retrieves the IP address of the peer machine.
lrs_receive("socket2", "buf20", LrsLastArg);
/* Get the size and location of the data within the buffer. */
peer =lrs_get_socket_attrib("socket2", REMOTE_ADDRESS );
lr_output_message("The IP address of the remote host is:%s\n", peer);
Message from run.c(32): The IP address of the remote host is:184.108.40.206