AddIoHandle

The AddIoHandle virtual method adds the file or socket handle to the I/O list.

Virtual Method Synopsis

AddIoHandle($fileHandle, $tag)

Parameters

$fileHandle
Specifies the file or socket handle.
$tag
Specifies the tag to be appended to "USER_" and to be associated with the messages.

Description

The AddIoHandle virtual method adds the file or socket handle specified in the $fileHandle parameter to the I/O list. When the file descriptor is available for reading, the tag "USER_$tag" is returned to the Perl application through a call to the RIV::GetResult() function.

Example Usage

$app->AddIoHandle(STDOUT, "test");

Returns

Upon completion, the AddIoHandle virtual method returns:

  • 0 (zero) — The attempt to add the file or socket handle to the I/O list was unsuccessful.
  • 1 — The attempt to add the file or socket handle to the I/O list was successful.

See Also