SecureBlackbox Lite 2020 Python Edition

Questions / Feedback?

on_data_received Event

Reports receipt of another chunk of data from the server.

Syntax

class SSHClientDataReceivedEventParams(object):
  @property
  def channel() -> int: ...
  @property
  def bytes_received() -> int: ...
  @property
  def total_bytes_pending() -> int: ...

# In class SSHClient:
@property
def on_data_received() -> Callable[[SSHClientDataReceivedEventParams], None]: ...
@on_data_received.setter
def on_data_received(event_hook: Callable[[SSHClientDataReceivedEventParams], None]) -> None: ...

Remarks

This event fires in asynchronous mode to report the receipt of another chunk of data from the server. Use receive or receive_bytes methodsto read out the received data.

The Channel parameter indicates the channel on which the data was received: stdout (0) or stderr (1). BytesReceived specify the size of the newly received chunk, and TotalBytesPending contain the total number of bytes available for reading.

Please note that just like other asynchronous mode events this event may fire from a secondary thread. Please make sure your code is prepared for that by using appropriate synchronization facilities.

This event does not fire in synchronous mode.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox Lite 2020 Python Edition - Version 20.0 [Build 8166]