From 07f5140771388c9e0c8a99b0dd2e5d950bdb173b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 14 Oct 2021 15:16:42 +1100 Subject: moving h-source subdir out. --- .../Swift/Plugins/BandwidthMonitorPlugin.php | 173 --------------------- 1 file changed, 173 deletions(-) delete mode 100755 h-source/External/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php (limited to 'h-source/External/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php') diff --git a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php b/h-source/External/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php deleted file mode 100755 index 501cd80..0000000 --- a/h-source/External/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php +++ /dev/null @@ -1,173 +0,0 @@ -getMessage(); - $message->toByteStream($this); - } - - /** - * Invoked immediately following a command being sent. - * @param Swift_Events_ResponseEvent $evt - */ - public function commandSent(Swift_Events_CommandEvent $evt) - { - $command = $evt->getCommand(); - $this->_out += strlen($command); - } - - /** - * Invoked immediately following a response coming back. - * @param Swift_Events_ResponseEvent $evt - */ - public function responseReceived(Swift_Events_ResponseEvent $evt) - { - $response = $evt->getResponse(); - $this->_in += strlen($response); - } - - /** - * Called when a message is sent so that the outgoing counter can be increased. - * @param string $bytes - */ - public function write($bytes) - { - $this->_out += strlen($bytes); - foreach ($this->_mirrors as $stream) - { - $stream->write($bytes); - } - } - - /** - * Not used. - */ - public function commit() - { - } - - /** - * Attach $is to this stream. - * The stream acts as an observer, receiving all data that is written. - * All {@link write()} and {@link flushBuffers()} operations will be mirrored. - * - * @param Swift_InputByteStream $is - */ - public function bind(Swift_InputByteStream $is) - { - $this->_mirrors[] = $is; - } - - /** - * Remove an already bound stream. - * If $is is not bound, no errors will be raised. - * If the stream currently has any buffered data it will be written to $is - * before unbinding occurs. - * - * @param Swift_InputByteStream $is - */ - public function unbind(Swift_InputByteStream $is) - { - foreach ($this->_mirrors as $k => $stream) - { - if ($is === $stream) - { - unset($this->_mirrors[$k]); - } - } - } - - /** - * Not used. - */ - public function flushBuffers() - { - foreach ($this->_mirrors as $stream) - { - $stream->flushBuffers(); - } - } - - /** - * Get the total number of bytes sent to the server. - * @return int - */ - public function getBytesOut() - { - return $this->_out; - } - - /** - * Get the total number of bytes received from the server. - * @return int - */ - public function getBytesIn() - { - return $this->_in; - } - - /** - * Reset the internal counters to zero. - */ - public function reset() - { - $this->_out = 0; - $this->_in = 0; - } - -} -- cgit v1.2.3