Sends a message to this client.

@return void
515598
public function send($command, $data)
    {
        $message = new Message;

        $message->command = $command;
        $message->data = $data;

        $this->connection->send($message->serialize());
    }
902332
public function send() {
    list ($headers, $blob, $code) = $this->toHttp();
    header('Content-Type: ' . Constants::MIME_TYPE);
    header("X-PHP-Response-Code: $code", TRUE, $code);
    foreach ($headers as $n => $v) {
      header("$n: $v");
    }
    echo $blob;
  }
236453
public function sendRequest()
    {
        if ($this->getError()->hasError() && !$this->inProgress) {
            return;
        }

        if (class_exists($this->dispatcher)) {
            $dispatcherClass = $this->dispatcher;
            $dispatcher = new $dispatcherClass($this->instance->getQuery());
            if ($dispatcher instanceof AbstractDispatcher) {
                $this->inProgress = true;
                try {
                    $client = new \Zend\XmlRpc\Client($this->getUrl());

                    $config = $this->config->getRawConfig();
                    $sql = $this->instance->getQuery()->toString();
                    $limit = $this->instance->getQuery()->getLimit();
                    $offset = $this->instance->getQuery()->getOffset();

                    $di = $client->getProxy('DBInstance');
                    if ($this->method == 'getAvailableDrivers') {
                        $this->availableDrivers = $di->getAvailableDrivers();
                    } elseif ($this->method == 'getServerVersion') {
                        $res = $di->getServerVersion();
                        $this->serverVersion = isset($res['version']) ? $res['version'] : null;
                    } else {
                        $response = $di->getResult(
                            $config,
                            $sql,
                            $limit,
                            $offset,
                            $this->instance->getQuery()->isSingle(),
                            $this->getKey(),
                            'array'
                        );
                        $dispatcher->dispatch($response);
                    }

                    $this->inProgress = false;
                } catch (\Zend\XmlRpc\Client\Exception\HttpException $e) {
                    $this->getError()->setMessage($e->getMessage());
                    $this->inProgress = false;
                } catch (\Zend\XmlRpc\Client\Exception\FaultException $e) {
                    $this->getError()->setMessage($e->getMessage());
                    $this->inProgress = false;
                } catch (\Exception $e) {
                    $this->getError()->setMessage('Error server response');
                    $this->inProgress = false;
                }
            } else {
                $this->getError()->setMessage(sprintf(
                    'Dispatcher class must be instance of %s, %s given',
                    AbstractDispatcher::class,
                    (string) $this->dispatcher
                ));
            }
        } else {
            $this->getError()->setMessage(sprintf('Class %s not found', (string) $this->dispatcher));
        }
    }
227952
private function sendStatus()
    {
        if (headers_sent()) return;

        if (isset($this->status_messages[$this->status])) {
            header(sprintf('HTTP/%s %d %s', $this->request->getHttpVersion(), $this->status, $this->status_messages[$this->status]));
        } else {
            header('Status: ' . $this->status);
        }
    }
51024
public function send()
    {
        setcookie(
            $this->name,
            $this->value,
            (int) $this->expire->format('U'),
            $this->path,
            $this->domain,
            $this->secure,
            $this->httpOnly
        );
    }
994434
public function send()
    {
        if ( ! headers_sent()) {
            $this->sendHeaders();
        }
        http_response_code($this->status);
        echo $this->prepareContent($this->content);
    }
1160653
public function send()
    {
        if (!$this->client) {
            throw new RuntimeException('A client must be set on the request');
        }

        if (null === $this->configuration->url) {
            $this->configuration->url = $this->getUrl()->toString();
        }
        $this->prepare();

        return $this->client->send($this);
    }
166445
public function send()
    {
        // prepare client
        $curl = new Curl(
            [
                'timeout' => 10,
            ]
        );
        $this->response = null;
        $this->response = $curl->sendRequest($this->getRequest());
    }
416524
public function send()
    {
        header($this->getStatusStr());

        foreach($this->headers as $header => $value) {
            header(sprintf("%s: %s", $header, implode(',', $value)));
        }

        $body = $this->getBody();

        if ($body->isAttached()) {
            $body->rewind();
            while (!$body->eof()) {
                echo $body->read($this->bodySize);
            }
        }
    }
413033
public function send()
    {
        if (!static::isSent()) {
            static::call('send', $this);
            foreach ($this->headers as $header => $value) {
                $this->setHttpHeader($header, $value);
            }
            http_response_code($this->status);
            echo $this->body;
            static::$sent = true;
            return true;
        }
        return false;
    }
1045946
public function sendCookies(): void
    {
        foreach ((array) $this->cookies as $cookie) {
            $this->sendCookie($cookie['name'], $cookie['value'], $cookie['expire'],
                $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httpOnly']);
        }
    }
431386
public function sendAction()
    {
        $result = \Cms\Model\Mail::send();
        if ($result['success'] > 0) {
            $this->getMessenger()->addMessage('messenger.mail.queue.sent', true);
        }
        if ($result['error'] > 0) {
            $this->getMessenger()->addMessage('messenger.mail.queue.error', false);
        }
        if ($result['success'] + $result['error'] == 0) {
            $this->getMessenger()->addMessage('messenger.mail.queue.empty');
        }
        $this->getResponse()->redirect('cmsAdmin', 'mail', 'index');
    }
1159573
public function send(){
        if(!$this->send){
            $response   = $this->handle();

            if($response !== null){
                $this->emit($response);
            }

            $this->send = true;

            $this->event(new Event("response.send.after"));
        }

        return !($this->error instanceof \Throwable);
    }
1311958
protected function send()
    {
        if (!$this->initialized) {
            $this->initialized = true;
            $this->sendHeader = $this->headersAccepted();

            if (!$this->sendHeader) {
                return;
            }
        }

        $jsonEncoded = json_encode($this->json);
        $jsonEncoded = str_replace("\n", '', $jsonEncoded);
        $encoded = base64_encode(utf8_encode($jsonEncoded));

        // Note it's 240KB to leave room for an error message
        if (strlen($encoded) > 240*1024) {
            $this->overflowed = true;

            $this->json['rows'][count($this->json['rows']) - 1] = array(
                'Logs truncated, exceeded Chrome header size limit',
                '',
                ''
            );

            $jsonEncoded = json_encode($this->json);
            $jsonEncoded = str_replace("\n", '', $jsonEncoded);
            $encoded = base64_encode(utf8_encode($jsonEncoded));
        }

        $this->sendHeader($encoded);
    }
401218
public function send()
    {
        foreach ($this->headers as $key => $value) {
            header("$key: " . implode(',', $value));
        }

        if($this->hasHeader('Content-Type') === false) {
            header(vsprintf(
                'Content-Type: %s',
                $this->hasHeader('Content-Type') ? $this->getHeader('Content-Type') : [$this->contentType]
            ));
        }

        http_response_code($this->getStatusCode());

        if ($this->stream !== null) {
            if ($this->compression) {
                ob_start('ob_gzhandler');
            }
            echo (string)$this->getBody();
        }

        ob_end_flush();
    }
1321174
public function sendHeaders()
    {
        if (!headers_sent()) {
            header(
                sprintf(
                    'HTTP/%s %s %s',
                    $this->getProtocolVersion(),
                    $this->getStatusCode(),
                    ($this->isOk() ? '' : $this->getReasonPhrase())
                ),
                true,
                $this->getStatusCode()
            );

            foreach ($this->header as $name => $value) {
                $name = str_replace(' ', '-', ucwords(str_replace('-', ' ', $name)));
                header(sprintf('%s: %s', $name, implode(',', $value)), false, $this->statusCode);
            }

            foreach ($this->cookie as $cookie) {
                header(sprintf('Set-Cookie: %s', $cookie->asString()), false, $this->getStatusCode());
            }
        }
    }
78275
public function send()
     {
         $response = $this->getResponse();

         if (in_array($response->getStatusCode(), array(204, 304))) {
             $response->setContent(null);
         }

        //Send headers and content
        $this->sendHeaders()->sendContent();
        fastcgi_finish_request();
     }