Send a the defined message to the backend.

        :param message: Message to be send, usually a Python dictionary.
553794
def send(self, message):
        
        try:
            self.ws.send(json.dumps(message))
        except websocket._exceptions.WebSocketConnectionClosedException:
            raise SelenolWebSocketClosedException()
15418
def send_message(self, text, chat_id, reply_to_message_id=None, disable_web_page_preview=False, reply_markup=None):
        
        self.logger.info('sending message "%s"', format(text.replace('\n', '\\n')))
        payload = dict(text=text,
                       chat_id=chat_id,
                       reply_to_message_id=reply_to_message_id,
                       disable_web_page_preview=disable_web_page_preview,
                       reply_markup=reply_markup)
        return Message.from_api(self, **self._get('sendMessage', payload))
445938
def send(self, event, message):
        
        self.connection.send({
            'reason': ['request', 'send'],
            'content': {
                'reason': event,
                'request_id': self.request_counter,
                'content': message,
            },
        })
        self.request_counter = self.request_counter + 1
745179
def message(self, message: types.Message):
        
        setattr(self, 'from_chat_id', message.chat.id)
        setattr(self, 'message_id', message.message_id)
        return self
384771
def _send(self, message):
        
        result = self._talk.put(message)
        if not result:
            self._logger.error('Failed to send "%s"' % message)
        return result
279496
def reply(self, message: typing.Union[int, types.Message]):
        
        setattr(self, 'reply_to_message_id', message.message_id if isinstance(message, types.Message) else message)
        return self
58660
def send(self, message):
        
        message.update(self._globalFields)
        errors = []
        for dest in self._destinations:
            try:
                dest(message)
            except:
                errors.append(sys.exc_info())
        if errors:
            raise _DestinationsSendError(errors)
994207
def send(self, message):
        
        if not isinstance(message, dict) and self.connected:
            warnings.warn('payload not a dictionary')
            return False
        try:
            message['node'] = self.profileNum
            self._mqttc.publish(self.topicInput, json.dumps(message), retain=False)
        except TypeError as err:
            LOGGER.error('MQTT Send Error: {}'.format(err), exc_info=True)
655307
def sendMessage(self, to, message, extra={}):
        
        to = to if isinstance(to, list) else [to]
        to = [str(num) for num in to]
        data = {'to': to, 'text': message}
        data = self.merge(data, {'callback': 7, 'mo': 1}, extra)

        content = self.parseRest(self.request('rest/message', data, {}, 'POST'));
        result = []

        # Messages in the REST response will contain errors on the message entry itself.
        for entry in content['message']:
            entry = self.merge({'apiMessageId': False, 'to': data['to'][0], 'error': False, 'errorCode': False}, entry)
            result.append({
                'id': entry['apiMessageId'].encode('utf-8'),
                'destination': entry['to'].encode('utf-8'),
                'error': entry['error']['description'].encode('utf-8') if entry['error'] != False else False,
                'errorCode': entry['error']['code'].encode('utf-8') if entry['error'] != False else False
            });

        return result
1206093
def send(self, message):
        
        message = message.SerializeToString()
        self.socket.sendall(struct.pack('!I', len(message)) + message)

        length = struct.unpack('!I', self.socket.recv(4))[0]
        response = riemann_client.riemann_pb2.Msg()
        response.ParseFromString(socket_recvall(self.socket, length))

        if not response.ok:
            raise RiemannError(response.error)

        return response
452326
def send_message(self, chat_id, text, **options):
        
        return self.api_call("sendMessage", chat_id=chat_id, text=text, **options)
629342
def sendMessage(self, message, thread_id=None, thread_type=ThreadType.USER):
        
        return self.send(
            Message(text=message), thread_id=thread_id, thread_type=thread_type
        )
1195534
def send(self, message):
        
        future = self.post(message)
        future.join()
        return future.result
789214
def send_msg(self, message):
        
        packet = self.driver.send(message)
        self.send_bytes(packet)
819255
async def send_message(self, *args, **kwargs):
        
        return await self._client.send_message(
            self.input_entity, *args, **kwargs)
1000727
async def send_message(  # type: ignore
        self, request: str, response_expected: bool, **kwargs: Any
    ) -> Response:
        
        headers = dict(self.DEFAULT_HEADERS)
        headers.update(kwargs.pop("headers", {}))

        response = await self.client.fetch(
            self.endpoint, method="POST", body=request, headers=headers, **kwargs
        )

        return Response(response.body.decode(), raw=response)
441454
def _send(self, message):
        
        if not self._running:
            self._connect()
            self.authenticate()
        message_dumped = json.dumps(message) + self.__CRLF
        try:
            self._socket.send(message_dumped.encode())
        except (socket.timeout, socket.error) as e:
            self.stop()
            raise SocketError('[Connect: %s]: Socket %s' % (self._unique_id, e))