private function setParameter(Parameter $param) { $set_param_head = 'SET_PARAM ' . $param->getKey(); try { if ($param->isRawValue()) { $raw_value = self::BEGIN_RAW . "\n" . base64_encode($param->getValue()) . "\n" . self::END_RAW; return $this->socket_client->request($set_param_head . ' ' . self::RAW_VALUE_ANNOUNCMENT . "\n" . $raw_value); } else { return $this->socket_client->request($set_param_head . ' ' . $param->getValue()); } } catch (\Exception $e) { throw $e; } }