Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Stdio
Stdio.Port

Method Stdio.Port()->query_address()


Method query_address

string query_address()

Description

Get the address and port of the local socket end-point.

Returns

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).

If there is some error querying or formatting the address, 0 (zero) is returned and errno() will return the error code.

Throws

An error is thrown if the socket isn't bound.