IPWorks SSH 2020 Python Edition

Questions / Feedback?

on_connection_request Event

Fired when a request for connection comes from a remote host.

Syntax

class SFTPServerConnectionRequestEventParams(object):
  @property
  def address() -> str: ...
  @property
  def port() -> int: ...
  @property
  def accept() -> bool: ...
  @accept.setter
  def accept(value) -> None: ...

# In class SFTPServer:
@property
def on_connection_request() -> Callable[[SFTPServerConnectionRequestEventParams], None]: ...
@on_connection_request.setter
def on_connection_request(event_hook: Callable[[SFTPServerConnectionRequestEventParams], None]) -> None: ...

Remarks

This event indicates an incoming connection. The connection is accepted by default. Address and Port will contain information about remote host requesting the inbound connection. If you want to refuse it, you can set the Accept parameter to False.

Copyright (c) 2023 /n software inc. - All rights reserved.
IPWorks SSH 2020 Python Edition - Version 20.0 [Build 8501]