diff options
-rw-r--r-- | src/Worker.php | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/Worker.php b/src/Worker.php index 74296801..d9de0fa9 100644 --- a/src/Worker.php +++ b/src/Worker.php @@ -83,26 +83,9 @@ class Worker */ public function send(string $payload = null, string $header = null): void { - if ($header === null) { - $this->relay->send('', Relay::PAYLOAD_CONTROL | Relay::PAYLOAD_NONE); - } else { - $this->relay->send($header, Relay::PAYLOAD_CONTROL | Relay::PAYLOAD_RAW); - } - - $this->relay->send((string)$payload, Relay::PAYLOAD_RAW); - } - - /** - * Respond to the server with result of task execution and execution context. Uses less amount of sys_calls. - * - * @param string|null $payload - * @param string|null $header - */ - public function sendPackage(string $payload = null, string $header = null): void - { $this->relay->sendPackage( (string)$header, - Relay::PAYLOAD_CONTROL | ($header ? Relay::PAYLOAD_NONE : Relay::PAYLOAD_RAW), + Relay::PAYLOAD_CONTROL | ($header === null ? Relay::PAYLOAD_NONE : Relay::PAYLOAD_RAW), (string)$payload, Relay::PAYLOAD_RAW ); |