on_before_send_reply Event
Notifies the application of a command reply being sent.
Syntax
class FTPServerBeforeSendReplyEventParams(object): @property def connection_id() -> int: ... @property def code() -> int: ... @code.setter def code(value) -> None: ... @property def reply() -> str: ... @reply.setter def reply(value) -> None: ... @property def command() -> str: ... # In class FTPServer: @property def on_before_send_reply() -> Callable[[FTPServerBeforeSendReplyEventParams], None]: ... @on_before_send_reply.setter def on_before_send_reply(event_hook: Callable[[FTPServerBeforeSendReplyEventParams], None]) -> None: ...
Remarks
The class fires this event to tell the application that a command reply is about to be sent. The Command parameter indicates the command that induced the reply, and Code and Reply indicate the pre-generated response.
You can alter the response parameters in your code to send bespoke replies.