Send a Jabber stanza over-the-wire.
969289
def send!(msg)
      attempts = 0
      begin
        attempts += 1
        client.send(msg)
      rescue Errno::EPIPE, IOError => e
        sleep 1
        disconnect
        reconnect
        retry unless attempts > 3
        raise e
      rescue Errno::ECONNRESET => e
        sleep (attempts^2) * 60 + 60
        disconnect
        reconnect
        retry unless attempts > 3
        raise e
      end
    end
56749
def sendintr(self):
        ''' '''

        n, byte = self.ptyproc.sendintr()
        self._log_control(byte)
868185
def sam_send(sock, line_and_data):
    """"""
    if isinstance(line_and_data, tuple):
        line, data = line_and_data
    else:
        line, data = line_and_data, b''

    line = bytes(line, encoding='ascii') + b' \n'
    # print('-->', line, data)
    sock.sendall(line + data)
563411
def _emit_message(cls, message):
        """"""
        sys.stdout.write(message)
        sys.stdout.flush()
728524
function transmit(sensor)
{
    var buffer = "Ping " + count;
    count++;
    console.log("Sending... " + buffer);

    sensor.sendStr(buffer, 3000);
    sensor.setSleep();
}
718616
def send(self, packet, mac_addr=broadcast_addr):
        """"""
        if self.keep_listening:
            if mac_addr == self.broadcast_addr:
                for addr, recv_queue in self.inq.items():
                    recv_queue.put(packet)
            else:
                self.inq[mac_addr].put(packet)
                self.inq[self.broadcast_addr].put(packet)
        else:
            self.log("is down.")
544949
def send(self, data, **kws):
        """"""
        return yield_(Send(self, data, timeout=self._timeout, **kws))
1155363
def listen(cls, event, func):
        """"""
        signal(event).connect(func, sender=cls)
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)
271695
def send(self, msg):
        """"""
        assert isinstance(msg, str), "String is required"

        if self._debug:
            log.info("outgoing message: %s, %s", self.id, str(msg)[:200])

        if self.state != STATE_OPEN:
            return

        self._feed(FRAME_MESSAGE, msg)
402127
def _send_packet(self, packet):
        """"""
        encoded = json.dumps(packet)
        self.ws.send(encoded)
378239
def send(self, packet, retry=True):
        """"""
        if not self.keep_listening:
            self.log('is down.')
            return

        try:
            # (because the IRC server sees this link as 1 connection no matter how many nodes use it, it wont send enough copies of the packet back)
            # for each node listening to this link object locally
            for mac_addr, recv_queue in self.inq.items():
                recv_queue.put(packet) # put the packet directly in their in queue
            # then send it down the wire to the IRC channel
            self.net_socket.send(('PRIVMSG %s :%s\r\n' % (self.channel, packet.decode())).encode('utf-8'))
        except Exception as e:
            self.log("Link failed to send packet over socket %s" % e)
            sleep(0.2)
            if retry:
                self.send(packet, retry=False)
727508
def sendp(x, inter=0, loop=0, iface=None, iface_hint=None, count=None, verbose=None, realtime=None, *args, **kargs):
    """"""
    if iface is None and iface_hint is not None:
        iface = conf.route.route(iface_hint)[0]
    __gen_send(conf.L2socket(iface=iface, *args, **kargs), x, inter=inter, loop=loop, count=count, verbose=verbose, realtime=realtime)
527991
def send_message(self, body, to, quiet=False, html_body=None):
        """"""
        if to.get('MUTED'):
            to['QUEUED_MESSAGES'].append(body)
        else:
            if not quiet:
                logger.info('message on %s to %s: %s' % (self.name, to['JID'], body))

            message = xmpp.protocol.Message(to=to['JID'], body=body, typ='chat')
            if html_body:
                html = xmpp.Node('html', {'xmlns': 'http://jabber.org/protocol/xhtml-im'})
                html.addChild(node=xmpp.simplexml.XML2Node("<body xmlns='http://www.w3.org/1999/xhtml'>" + html_body.encode('utf-8') + "</body>"))
                message.addChild(node=html)

            self.client.send(message)
491706
def send_message(self, *args, **kwargs):
        """"""
        return send_message(*args, **self._merge_overrides(**kwargs)).run()
1072434
def send_and_require(self,
	                     send,
	                     regexps,
	                     not_there=False,
	                     echo=None,
	                     note=None,
	                     loglevel=logging.INFO):
		
		shutit = self.shutit
		echo = shutit.get_echo_override(echo)
		return self.send_until(send,
		                       regexps,
		                       not_there=not_there,
		                       cadence=0,
		                       retries=1,
		                       echo=echo,
		                       note=note,
		                       loglevel=loglevel)
940124
def send(self, topic, message):
        """"""

        if not message:
            Log.error("Expecting a message")

        message._prepare()

        if not self.connection:
            self.connect()

        producer = Producer(
            channel=self.connection,
            exchange=Exchange(self.settings.exchange, type='topic'),
            routing_key=topic
        )

        # The message is actually a simple envelope format with a payload and
        # some metadata.
        final_data = Data(
            payload=message.data,
            _meta=set_default({
                'exchange': self.settings.exchange,
                'routing_key': message.routing_key,
                'serializer': self.settings.serializer,
                'sent': time_to_string(datetime.datetime.now(timezone(self.settings.broker_timezone))),
                'count': self.count
            }, message.metadata)
        )

        producer.publish(jsons.scrub(final_data), serializer=self.settings.serializer)
        self.count += 1