original_string: protected function processResponse($str)
      {
  
          if (!empty($this->encryption_key)) {
              $str = $this->encryptor->decrypt($str);
          }
  
          $this->logResponse($str);
  
          //check if response body is serialized json_response object and just unserialize and return if it is
          if ($this->php_serialize_response && !empty($str)) {
  
              try {
                  $serialized = \unserialize($str);
                  if ($serialized !== false) {
                      $response = $serialized;
                  }
              } catch (\Exception $e) {
  
                  if ($this->debug) {
                      echo $body;
                  }
              }
          }
  
          //Not sure about this?
          $str = \utf8_encode($str);
  
          if (!isset($response)) {
              $response = new \sb\JSON\RPC2\Response($str);
          }
  
          return $response;
      }
code: protected function processResponse($str)
      {
  
          if (!empty($this->encryption_key)) {
              $str = $this->encryptor->decrypt($str);
          }
  
          $this->logResponse($str);
  
          //check if response body is serialized json_response object and just unserialize and return if it is
          if ($this->php_serialize_response && !empty($str)) {
  
              try {
                  $serialized = \unserialize($str);
                  if ($serialized !== false) {
                      $response = $serialized;
                  }
              } catch (\Exception $e) {
  
                  if ($this->debug) {
                      echo $body;
                  }
              }
          }
  
          //Not sure about this?
          $str = \utf8_encode($str);
  
          if (!isset($response)) {
              $response = new \sb\JSON\RPC2\Response($str);
          }
  
          return $response;
      }
code_tokens: protected function processResponse ( $ str ) { if ( ! empty ( $ this -> encryption_key ) ) { $ str = $ this -> encryptor -> decrypt ( $ str ) ; } $ this -> logResponse ( $ str ) ; //check if response body is serialized json_response object and just unserialize and return if it is if ( $ this -> php_serialize_response && ! empty ( $ str ) ) { try { $ serialized = \ unserialize ( $ str ) ; if ( $ serialized !== false ) { $ response = $ serialized ; } } catch ( \ Exception $ e ) { if ( $ this -> debug ) { echo $ body ; } } } //Not sure about this? $ str = \ utf8_encode ( $ str ) ; if ( ! isset ( $ response ) ) { $ response = new \ sb \ JSON \ RPC2 \ Response ( $ str ) ; } return $ response ; }
docstring: Break down the received data into headers and response and then handle gz encoding, encryption, utf, etc
  @param $str  The data returned from the socket connection
  @return string The body of the message
docstring_tokens: Break down the received data into headers and response and then handle gz encoding encryption utf etc