Extracted from Pike v7.4 release 341 at 2005-11-30.
pike.ida.liu.se
[Top]
predef::
Stdio
Stdio.File

Method Stdio.File()->query_address()


Method query_address

string query_address()
string 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

connect()