/**
  * There are certain incoming events that the client processes internally.
  * These functions are essential to the client-server relationship: for example,
  * updating the connection's stored nickname, responding to PING events, etc.
  *
  * Any user-level IRC functionality handled internally by the client
  * should be implemented here.
  *
  * @param array $message Parser output
  * @param \Phergie\Irc\Client\React\WriteStream $write Write stream
  *        corresponding to the read stream on which the event occurred
  * @param \Phergie\Irc\ConnectionInterface $connection Connection on
  *        which the event occurred
  */
 protected function processInput(array $message, WriteStream $write, ConnectionInterface $connection)
 {
     switch ($message['command']) {
         // Update connection's internal nickname when changed
         case 'NICK':
             if ($connection->getNickname() === $message['nick']) {
                 $connection->setNickname($message['params']['nickname']);
             }
             break;
             // Play client-server ping-pong
         // Play client-server ping-pong
         case 'PING':
             $write->ircPong($message['params']['server1']);
             break;
     }
 }