string query_address()
Get the address and port of the local socket end-point.
This function returns the address and port of a socket end-point on the form "x.x.x.x port" (IPv4) or "x:x:x:x:x:x:x:x port" (IPv6).
"x.x.x.x port"
"x:x:x:x:x:x:x:x port"
If there is some error querying or formatting the address, 0 (zero) is returned and errno() will return the error code.
0
An error is thrown if the socket isn't bound.