Extracted from Pike v7.3 release 14 at 2002-02-15.
pike.roxen.com
[Top]
Stdio
Stdio.Fd

Method Stdio.Fd()->query_address()


Method query_address

string Stdio.Fd()->query_address()
string Stdio.Fd()->query_address(int(0..1) local)

Description

Get address and port of a socket end-point.

This function returns the remote or local address of a socket on the form "x.x.x.x port".

If the argument local is not specified, or is 0 (zero), the remote address will be returned. Otherwise, if local is 1, the local address will be returned.

If the file is not a socket, not connected, or some other error occurrs, 0 (zero) will be returned.

See also

Stdio.Fd.connect