Implement the get IP and port for a friend function
Signed-off-by: Nightmaster <nightmaster@seitaer.com>