Send calling request.

@param mixed $message

@return mixed
760282
public function request($message)
    {

        try {
            $body = $this->serializer->serialize($message);

            $data = $this->executeRequest($body);

            return $this->serializer->deserialize($data);
        } catch (HomerException $e) {
            $this->disconnect();

            throw $e;
        } catch (Throwable $e) {
            $this->disconnect();

            Log::channel('homer')->warning('Send rpc request failed', [
                'exception' => $e
            ]);

            throw new TransportException('Send rpc request failed, cause: '.$e->getMessage(), 0, $e);
        }
    }
373127
public function sendMessage(Message $message)
    {
        $payload = $this->preparePayload($message);

        $encoded = json_encode($payload, JSON_UNESCAPED_UNICODE);

        if ($encoded === false) {
            throw new RuntimeException(sprintf('JSON encoding error %s: %s', json_last_error(), json_last_error_msg()));
        }

        $this->guzzle->post($this->endpoint, ['body' => $encoded]);
    }
939652
public function get($message)
    {
        if (isset($this->messages[$message])) {
            $message = $this->messages[$message][0];
        }
        return $this->replacePlaceholders($message, array_slice(func_get_args(), 1));
    }
29381
public function send(Message $message)
    {
        if (empty($message->getTo()) || empty($message->getSubject()) || empty($message->getMessage())) {
            throw new InvalidArgumentException(
                "An error has occurred. The sender or the message or object omits.",
                E_USER_ERROR
            );
        }

        if (isset($this->config['mail'])) {
            $section = $this->config['mail']['default'];

            if (!$message->fromIsDefined()) {
                $form = $this->config['mail'][$section];

                $message->from($form["address"], $form["username"]);
            } elseif (!Str::isMail($message->getFrom())) {
                $form = $this->config['mail'][$message->getFrom()];

                $message->from($form["address"], $form["username"]);
            }
        }

        $to = '';

        $message->setDefaultHeader();

        foreach ($message->getTo() as $value) {
            if ($value[0] !== null) {
                $to .= $value[0] . ' <' . $value[1] . '>';
            } else {
                $to .= '<' . $value[1] . '>';
            }
        }

        $headers = $message->compileHeaders();

        $headers .= 'Content-Type: ' . $message->getType() . '; charset=' . $message->getCharset() . Message::END;

        $headers .= 'Content-Transfer-Encoding: 8bit' . Message::END;

        // Send email use the php native function
        $status = @mail($to, $message->getSubject(), $message->getMessage(), $headers);

        return (bool) $status;
    }
1243968
public function wrapAndSerialize($message)
    {
        $envelope = $this->envelopeFactory->wrapMessageInEnvelope($message);

        $serializedMessage = $this->objectSerializer->serialize($message);

        return $this->objectSerializer->serialize($envelope->withSerializedMessage($serializedMessage));
    }
713440
public function translate($message)
    {
        if (isset($this->translations[$message])) {
            return $this->translations[$message];
        } else {
            return $message;
        }
    }
288350
public function sendMessage($message, $tts = false)
    {
        $deferred = new Deferred();

        $this->getPrivateChannel()->then(function ($channel) use ($message, $tts, $deferred) {
            $channel->sendMessage($message, $tts)->then(function ($response) use ($deferred) {
                $message = $this->factory->create(Message::class, $response, true);
                $deferred->resolve($message);
            }, \React\Partial\bind_right($this->reject, $deferred));
        }, \React\Partial\bind_right($this->reject, $deferred));

        return $deferred->promise();
    }
615066
protected function SendMessage($message)
    {
        $this->signal_data->message = $message;
        
        $this->Send(
            \Peg\Lib\Signals\Type\Lexers::LEXER_MESSAGE,
            $this->signal_data
        );
    }
531568
public function sendMessage(string $message) : ?Message 
    {
        $thread = $this->messageGroup();

        if ($thread === null) return null;

        return $thread->sendMessage($message);
    }
313221
public function a($message) {
        return isset($this->messages[$message]) ? $this->messages[$message] : $message;
    }
49276
public function push($message)
    {
        $status = array('success' => 0, 'failure' => 0);

        foreach (static::getPlatformServices() as $platform => $service_klass) {
            $service = new $service_klass();
            $query = App::collection('push_registrations')->where('platform', $platform);
            $query->chunk(self::MAX_RECIPIENTS_PER_REQUEST, function ($registrations) use (&$platform, &$service, &$status, $message) {
                try {
                    $chunk_status = $service->push($registrations, $message);
                    $status['success'] += $chunk_status['success'];
                    $status['failure'] += $chunk_status['failure'];
                } catch (\Exception $e) {
                    Logger::debug("PushNotification: platform: {$platform} -> {$e->getMessage()}");
                }
            });
        }

        return $status;
    }
901656
public function send(Message $message)
    {
        try {
            return $this->transport->send($message);
        } catch (\Exception $e) {
            $this->lastError = $e;
            return 0;
        }
    }
1347290
protected function sendSwiftMessage($message)
	{
		if ($this->events)
		{
			$this->events->fire('mailer.sending', array($message));
		}

		if ( ! $this->pretending)
		{
			return $this->swift->send($message, $this->failedRecipients);
		}
		elseif (isset($this->logger))
		{
			$this->logMessage($message);
		}
	}
974235
protected function send($message)
	{
		$message = $this->encodeMessage($message);
		$this->ws->send($message);
	}
125597
public function sendMessage(Message $message)
    {
        $this->currentId++;
        $messageData = $message->convertToRconData($this->currentId);
        $this->client->write($messageData);

        return $this->getResponseMessage();
    }
206831
public static function decodeMessage(string $message): Message
    {
        $offset = 0;
        $header = self::decodeHeader($message, $offset);
        $messageObject = new Message($header);
        $messageObject->setQuestions(self::decodeResourceRecords($message, $header->getQuestionCount(), $offset, true));
        $messageObject->setAnswers(self::decodeResourceRecords($message, $header->getAnswerCount(), $offset));
        $messageObject->setAuthoritatives(self::decodeResourceRecords($message, $header->getNameServerCount(), $offset));
        $messageObject->setAdditionals(self::decodeResourceRecords($message, $header->getAdditionalRecordsCount(), $offset));

        return $messageObject;
    }
1302409
public function sendMessage(Message $message) {
        if ($this->isDisabled()) {
            return false;
        }

        $users = $message->getMyDestionationUsers($this->container);
        $sentCount = 0;
        foreach($users as $user) {
            //if($user->getId() != $message->getFromUser()->getId()){
            $sentCount += $this->sendMessageToUser($message, $user);
            //}
        }
        return $sentCount;
    }