Send any kind of message.

        Parameters
        ----------
        msg : Message object
            The message to send.
350093
def send_message(self, msg):
        
        assert get_thread_ident() == self.ioloop_thread_id
        data = str(msg) + "\n"
        # Log all sent messages here so no one else has to.
        if self._logger.isEnabledFor(logging.DEBUG):
            self._logger.debug("Sending to {}: {}"
                               .format(self.bind_address_string, repr(data)))
        if not self._connected.isSet():
            raise KatcpClientDisconnected('Not connected to device {0}'.format(
                self.bind_address_string))
        try:
            return self._stream.write(data)
        except Exception:
            self._logger.warn('Could not send message {0!r} to {1!r}'
                              .format(str(msg), self._bindaddr), exc_info=True)
            self._disconnect(exc_info=True)
308946
def send_message(self, message, sign=True):
		
		self.check_connected()
		self.protocol.send_message(message, sign)
1038709
def send(self, message):  # usually a json string...
        
        for transport in self.transports.values():
            transport.protocol.sendMessage(message)
46851
def send(self, msg):
        
        msg.dst_id = self.context_id
        self.router.route(msg)
962337
def send_message(self, message):
        
        if self._error:
            raise compat.saved_exc(self._error)
        elif self._transport is None:
            raise JsonRpcError('not connected')
        self._version.check_message(message)
        self._writer.write(serialize(message))
28003
def sendmess(self, msgtype, payload, flags=0, size=0, offset=0, timeout=0):
        

        # reuse last valid connection or create new
        conn = self.conn or self._new_connection()
        # invalidate last connection
        self.conn = None

        flags |= self.flags
        assert (flags & FLG_PERSISTENCE)
        ret, rflags, data = conn.req(
            msgtype, payload, flags, size, offset, timeout)
        if rflags & FLG_PERSISTENCE:
            # persistence granted, save connection object for reuse
            self.conn = conn
        else:
            # discard connection object
            conn.shutdown()

        return ret, data
562358
def sendmess(self, msgtype, payload, flags=0, size=0, offset=0, timeout=0):
        

        flags |= self.flags
        assert not (flags & FLG_PERSISTENCE)

        with self._new_connection() as conn:
            ret, _, data = conn.req(
                msgtype, payload, flags, size, offset, timeout)

        return ret, data
598960
def send(self, msg_p):
        
        return lib.zactor_send(self._as_parameter_, byref(zmsg_p.from_param(msg_p)))
834596
def send(self, msg):
        """"""
        debug('sent %s', msg)
        self.loop.send(self._packer.pack(msg))
92951
def _send(self, msg, buffers=None):
        """"""
        if self.comm is not None and self.comm.kernel is not None:
            self.comm.send(data=msg, buffers=buffers)
946283
def send_request(self, msg):
        
        assert(msg.mtype == Message.REQUEST)
        if msg.mid and not self._server_supports_ids:
            raise KatcpVersionError('Message IDs not supported by server')
        self.send_message(msg)
796038
def send(self, to, from_, body):
        
        try:
            msg = self.client.sms.messages.create(
                body=body,
                to=to,
                from_=from_
                )
            print msg.sid
        except twilio.TwilioRestException as e:
            raise
254066
def mass_send_message(self, msg):
        
        for stream in self._connections.keys():
            if not stream.closed():
                # Don't cause noise by trying to write to already closed streams
                self.send_message(stream, msg)
1116844
def send_message(self, msg):
        
        if not self.handlers:
            return  #: Client not connected
        for h in self.handlers:
            h.write_message(msg)
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)
737367
def notify(self, msg):
        
        for listener in self.listeners:
            self._send(listener, msg)
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