null, ]; $this->handler = $config['handler']; } /** * 发送请求,并接受返回 * * @return Response */ public function sendAndReceive() { try { return call_user_func_array([$this->handler, 'sendAndReceive'], []); } catch (\Exception $ex) { throw $ex; } } public function send($message = null) { try { return call_user_func_array([$this->handler, 'send'], [$message]); } catch (\Exception $ex) { throw $ex; } } public function receive() { try { return call_user_func_array([$this->handler, 'receive'], []); } catch (\Exception $ex) { throw $ex; } } }