Example #1
0
 /**
  * Process the request
  *
  * @param Request $request
  * @return Reply
  * @throws ApiException
  */
 public function process(Request $request)
 {
     if ($this->debug) {
         echo $request->getRaw() . "\n";
     }
     $msg = $request->getRaw();
     $str = $this->send($msg);
     if (!$str) {
         throw new ApiException('Bad reply', 4004);
     }
     if ($this->debug) {
         echo $str . "\n";
     }
     return new Reply($str);
 }