Send a generic message to the connection
            :param msg:
            :param msg_type:
            :param msg_title:
            :return:
492121
async def send_message(self, msg: str, msg_type: str, msg_title: str) -> str:
        
        if not hasattr(Connection.send_message, "cb"):
            self.logger.debug("vcx_connection_send_message: Creating callback")
            Connection.send_message.cb = create_cb(CFUNCTYPE(None, c_uint32, c_uint32, c_char_p))

        c_connection_handle = c_uint32(self.handle)
        c_msg = c_char_p(msg.encode('utf-8'))
        c_msg_type = c_char_p(msg_type.encode('utf-8'))
        c_msg_title = c_char_p(msg_title.encode('utf-8'))

        result = await do_call('vcx_connection_send_message',
                               c_connection_handle,
                               c_msg,
                               c_msg_type,
                               c_msg_title,
                               Connection.send_message.cb)

        self.logger.debug("vcx_connection_send_message completed")
        return result
419340
def send_message(type, message=nil)
      message = message.nil? ? message = '' : message.to_json
      body = type + ' ' + message
      body.strip!
      length = body.bytesize
      @client.write("#{length}\n#{body}")
    end
1153808
def send_message(self, msg, stats=True):
        
        self.send_jsonified(proto.json_encode(msg), stats)
915293
def send_message(self, payload):
        
        self.l.info("Creating outbound message request")
        result = ms_client.create_outbound(payload)
        self.l.info("Created outbound message request")
        return result
440213
def Message(message, title='FontParts', informativeText=""):
    
    return dispatcher["Message"](message=message, title=title,
                                 informativeText=informativeText)
658548
def wrap_message(msg, type)
      # Wrap it in an envelope
      outer = OuterMessage.new
      outer.protocol_version = 1
      outer.status  = OuterMessage::Status::STATUS_OK
      outer.type    = type
      outer.payload = msg.serialize_to_string

      return outer
    end
476406
def title(cls, message=None):
        ''''''
        if message == None:
            return getproctitle()
        else:
            setproctitle('qless-py-worker %s' % message)
            logger.info(message)
376390
def send_message(self, msg, connection_id=None):
        
        zmq_identity = None
        if connection_id is not None and self._connections is not None:
            if connection_id in self._connections:
                connection_info = self._connections.get(connection_id)
                if connection_info.connection_type == \
                        ConnectionType.ZMQ_IDENTITY:
                    zmq_identity = connection_info.connection
            else:
                LOGGER.debug("Can't send to %s, not in self._connections",
                             connection_id)

        self._ready.wait()

        if zmq_identity is None:
            message_bundle = [msg.SerializeToString()]
        else:
            message_bundle = [bytes(zmq_identity),
                              msg.SerializeToString()]

        try:
            asyncio.run_coroutine_threadsafe(
                self._send_message_frame(message_bundle),
                self._event_loop)
        except RuntimeError:
            # run_coroutine_threadsafe will throw a RuntimeError if
            # the eventloop is closed. This occurs on shutdown.
            pass
1083918
def _send_event(self, title, text, tags, event_type, aggregation_key, severity='info'):
        """"""
        event_dict = {
            'timestamp': int(time()),
            'source_type_name': self.SOURCE_TYPE_NAME,
            'msg_title': title,
            'event_type': event_type,
            'alert_type': severity,
            'msg_text': text,
            'tags': tags,
            'aggregation_key': aggregation_key,
        }
        self.event(event_dict)
904758
def _send(self, msg):
        
        uuid = self.m2req.sender
        conn_id = self.m2req.conn_id

        header = "%s %d:%s," % (uuid, len(str(conn_id)), str(conn_id))
        zmq_message = header + ' ' + msg
        self.stream.send(zmq_message)
976611
def report_message_type(self, msg):
        
        desc = get_message_description(self.linter, msg.msg_id)
        self.tc.message('inspectionType', id=msg.msg_id, name=msg.symbol, description=desc, category=msg.category)
233760
def sendMessage(self, msg):
        
        if msg._messageType in (1, 2):
            assert msg.destination, 'Failed to specify a message destination'

        if msg.destination is not None:
            if msg.destination[0] == ':':
                p = self.clients.get(msg.destination, None)
            else:
                p = self.busNames.get(msg.destination, None)
                if p:
                    p = p[0]

            # print 'SND: ', msg._messageType, ' to ',  p.uniqueName, 'serial',
            # msg.serial,

            if p:
                p.sendMessage(msg)
            else:
                log.msg(
                    'Invalid bus name in msg.destination: '
                    + msg.destination
                )
        else:
            self.router.routeMessage(msg)
578710
def send_notification(self, title, message, typ=1, url=None, sender=None):
        
        self.user.send_notification(title=title, message=message, typ=typ, url=url,
                                    sender=sender)
658297
def title(msg):
    """"""
    if sys.platform.startswith("win"):
        ctypes.windll.kernel32.SetConsoleTitleW(tounicode(msg))
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)
1265760
def send_single_text(self, sender, receiver, content):
        
        return self.send_text(sender, 'single', receiver, content)
1268736
async def root_message(self, msg, msg_type=None):
        
        await self.root()
        await self.message(msg, msg_type)