Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<ssh2_methods_negotiatedssh2_publickey_add>
^SSH2 FunctionsLast updated: Mon, 26 Oct 2026

ssh2_poll

(PECL ssh2 >= 0.9.0)

ssh2_poll — Poll the channels/listeners/streams for events

Description

function ssh2_poll(array &$desc, int $timeout = 30): int

Polls the channels/listeners/streams for events, and returns the number of descriptors which returned non-zero revents.

Warning

This function is currently not documented; only its argument list is available.

Parameters

desc

An indexed array of subarrays with the keys 'resource' and 'events'. The value of the resource is a (channel) stream or an SSH2 Listener resource. The value of the event are SSH2_POLL* flags bitwise ORed together. Each subarray will be populated with an 'revents' element on return, whose values are SSH2_POLL* flags bitwise ORed together of the events that occurred.

timeout

The timeout in seconds.

Return Values

Returns the number of descriptors which returned non-zero revents.


<ssh2_methods_negotiatedssh2_publickey_add>
^SSH2 FunctionsLast updated: Mon, 26 Oct 2026