Send an xmpp message with the data
1138
def returner(ret):
    '''
    
    '''

    _options = _get_options(ret)

    from_jid = _options.get('from_jid')
    password = _options.get('password')
    recipient_jid = _options.get('recipient_jid')

    if not from_jid:
        log.error('xmpp.jid not defined in salt config')
        return

    if not password:
        log.error('xmpp.password not defined in salt config')
        return

    if not recipient_jid:
        log.error('xmpp.recipient not defined in salt config')
        return

    message = ('id: {0}\r\n'
               'function: {1}\r\n'
               'function args: {2}\r\n'
               'jid: {3}\r\n'
               'return: {4}\r\n').format(
                    ret.get('id'),
                    ret.get('fun'),
                    ret.get('fun_args'),
                    ret.get('jid'),
                    pprint.pformat(ret.get('return')))

    xmpp = SendMsgBot(from_jid, password, recipient_jid, message)
    xmpp.register_plugin('xep_0030')  # Service Discovery
    xmpp.register_plugin('xep_0199')  # XMPP Ping

    if xmpp.connect():
        xmpp.process(block=True)
        return True
    return False
338220
def send(self, data):
        
        self.future_session.post(url=self.url, data=data)
649202
def send(self, message):
        """"""
        if not message:
            return
        topic, payload, qos = self._parse_message_to_mqtt(message)
        try:
            _LOGGER.debug('Publishing %s', message.strip())
            self._pub_callback(topic, payload, qos, self._retain)
        except Exception as exception:  # pylint: disable=broad-except
            _LOGGER.exception('Publish to %s failed: %s', topic, exception)
1331189
def send_message(client, message):
    """"""
    print(message)
    client.send("HTTP/1.1 200 OK\r\n\r\n{}".format(message).encode("utf-8"))
    client.close()
783420
def send(self, data: bytes = b""):
        
        self.input.extend(data)
        self._process()
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)
1012025
def sendMessage(self, data):
      
      opcode = BINARY
      if isinstance(data, unicode):
         opcode = TEXT
      self._sendMessage(False, opcode, data)
1104907
def send_messages(self, data, timeout=30, endpoint='/collab/start/'):
        """"""
        address = 'https://{}{}'.format(self.COLLAB_SERVER, endpoint)
        params = {
            'client_name': 'ok-client',
            'client_version': client.__version__,
        }

        log.info('Sending messages to %s', address)
        try:
            r = requests.post(address, params=params, json=data, timeout=timeout)
            r.raise_for_status()
            return r.json()
        except (requests.exceptions.RequestException, requests.exceptions.BaseHTTPError, Exception) as ex:
            message = '{}: {}'.format(ex.__class__.__name__, str(ex))
            log.warning(message)
            print("There was an error connecting to the server."
                  "Run with --debug for more details")
        return
109776
public void send(Message message) {
        String sendUrl = WxEndpoint.get("url.template.send");
        String json = JsonMapper.defaultMapper().toJson(message);

        logger.debug("template message, send message: {}", json);
        String response = wxClient.post(sendUrl, json);
        JsonMapper.defaultMapper().json2Map(response);
    }
630653
private function sendPing()
    {
        $this->timeSincePingReq = time();
        $payload = chr(0xc0).chr(0x00);
        fwrite($this->socket, $payload, 2);

        $this->debugMessage("PING sent");
    }
423494
def _send(self, message, fail_silently=False):
        
        seeds = '1234567890qwertyuiopasdfghjklzxcvbnm'
        file_part1 = datetime.now().strftime('%Y%m%d%H%M%S')
        file_part2 = ''.join(sample(seeds, 4))
        filename = join(self.tld, '%s_%s.msg' % (file_part1, file_part2))
        with open(filename, 'w') as fd:
            fd.write(str(message.to_message()))
796658
def sendData(self, data):
        """"""
        # Not set up yet
        if self.client_log is None:
            self.client_log_buffer.append(data)
        else:
            self.client_log.write(data)
        self.transport.write(data)
691321
def send(self, message):
        
        if not isinstance(message, (Msg, MsgProto)):
            raise ValueError("Expected Msg or MsgProto, got %s" % message)

        if self.steam_id:
            message.steamID = self.steam_id
        if self.session_id:
            message.sessionID = self.session_id

        if self.verbose_debug:
            self._LOG.debug("Outgoing: %s\n%s" % (repr(message), str(message)))
        else:
            self._LOG.debug("Outgoing: %s", repr(message))

        data = message.serialize()

        if self.channel_key:
            if self.channel_hmac:
                data = crypto.symmetric_encrypt_HMAC(data, self.channel_key, self.channel_hmac)
            else:
                data = crypto.symmetric_encrypt(data, self.channel_key)

        self.connection.put_message(data)
897666
def send_data_on_udp(ip_address, port, data):
    """"""
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    try:
        sock.sendto(data.encode('utf-8'), (ip_address, port))
    except:
        LOGGER.exception('Failed to send trace to X-Ray Daemon')
    finally:
        sock.close()
910553
function sendMessage (client, data, batchCallback) {
  var msg = data.msg;
  var offset = data.offset;
  var length = data.length;
  var port = data.port;
  var address = data.address;
  var callback = data.callback;

  client.send(msg, offset, length, port, address, function(err) {
    try {
      callback(err);
    } finally {
      batchCallback();
    }
  });
}
690555
def sendto(self, data, *args):
        '''
        
        '''
        remoteaddr = args[-1]
        remoteaddr = _normalize_addrs(remoteaddr)
        return self._send(data, (self._proto, self._local_addr[0], 
            self._local_addr[1], remoteaddr[0], remoteaddr[1]))
264923
public void sendMessage(String message) {
		try {
			getChat().sendMessage(message);
		} catch (XMPPException | NotConnectedException e) {
			e.printStackTrace();
		}
	}