Net::SSH2->poll doc:
Deprecated: the poll functionality in libssh2 is deprecated and its usage disregarded. Session methods "sock" and "block_directions" can be used instead to integrate Net::SSH2 inside an external event loop.
Can someone provide an example how "sock" and "block_directions" could be used instead of deprecated poll function?