/** * Write payload data to connection * * @param string $payload * * @return bool */ private function writePayload($payload) { return strlen($payload) === $this->connection->write($payload, strlen($payload)); }