public function receive($sender, ProtocolInterface $protocol) { if ($this->handleReceiveRequest($protocol)) { return; } if ($this->handleReceiveResponse($protocol) || $this->getInput()->handle($sender, $protocol)) { $this->emit('input', [$sender, $protocol]); } }