Sends a message to a given address
336295
public void send(OutputStream os, 
                   HeadersAmp headers,
                   String address, 
                   String methodName,
                   PodRef podCaller,
                   Object []args)
    throws IOException
  {
    init(os);

    OutH3 out = _out;

    if (out == null) {
      return;
    }
    
    if (log.isLoggable(Level.FINEST)) {
      log.finest("hamp-send-w " + methodName + Arrays.asList(args)
                + "\n  {to:" + address + "}");
    }
  
    try {
      out.writeLong(MessageTypeHamp.SEND.ordinal());
      writeHeaders(out, headers);
    
      writeMethod(out, address, methodName, podCaller);
      writeArgs(out, args);

      // XXX: out.flushBuffer();
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);
      
      throw e;
    }
  }
51688
def publish(self, message, tag=b''):
        
        self.send(tag + b'\0' + message)
15989
def maybe_send(self, recipient: Address, message: Message):
        

        if not is_binary_address(recipient):
            raise InvalidAddress('Invalid address {}'.format(pex(recipient)))

        messagedata = message.encode()
        host_port = self.get_host_port(recipient)

        self.maybe_sendraw(host_port, messagedata)
419651
def send_messages(self, messages, timeout):
        """"""
        data = {
            'assignment': self.assignment.endpoint,
            'messages': messages,
            'submit': self.args.submit
        }
        address = self.API_ENDPOINT
        address_params = {
            'client_name': 'ok-client',
            'client_version': client.__version__,
        }
        log.info('Sending messages to %s', address)
        try:
            response = requests.post(address,
                params=address_params, json=data, timeout=timeout)
            response.raise_for_status()
            return response.json()['url']
        except (requests.exceptions.RequestException, requests.exceptions.BaseHTTPError, ValueError) as ex:
            log.warning('%s: %s', ex.__class__.__name__, str(ex))
        return
935167
def send(self, data):
        """"""
        # send message
        _LOGGER.debug("send: " + data)
        self.socket.send(data.encode('ascii'))
        # sleep needed to prevent flooding the GC100 with sends
        sleep(.01)
1609
def send_message(url, message):
    '''
    
    '''
    headers = {'Content-Type': 'application/json'}
    data = {'text': message}
    result = __utils__['http.query'](url,
                                     'POST',
                                     data=json.dumps(data),
                                     header_dict=headers,
                                     decode=True,
                                     status=True)

    if result.get('status', 0) == 200:
        return True
    else:
        return False
509288
def _send_mail(self, receivers_list, subject, body, log_files=None):
        if not receivers_list:
            self.log.info('no valid addresses in requested addresses. Doing nothing')
            return

        self.log.info('sending notification to %s ...', receivers_list)

        """"""
        if log_files:
            msg = MIMEMultipart()
            msg.attach(MIMEText(body))
            for entry in log_files:
                log_mime = MIMEBase('application', "octet-stream")
                log_file = entry[0]  # Output.file
                log_file.seek(0)
                log_mime.set_payload(log_file.read())
                encoders.encode_base64(log_mime)
                log_mime.add_header('Content-Disposition',
                                    'attachment; filename="{}"'.format(entry[1]['filename']))
                msg.attach(log_mime)
        else:
            msg = MIMEText(body)
        msg['Subject'] = subject
        msg['From'] = self.from_address
        msg['To'] = ', '.join([x.strip() for x in receivers_list])

        s = None
        try:
            s = get_smtp_session(self.workflow, self.smtp_fallback)
            s.sendmail(self.from_address, receivers_list, msg.as_string())
        except (socket.gaierror, smtplib.SMTPException):
            self.log.error('Error communicating with SMTP server')
            raise
        finally:
            if s is not None:
                s.quit()
71726
def received_message(self, address, data):
        """"""
        self.value_cache.set(address, data)
        if self.notify:
            self.notify(address, data)

        try:
            listeners = self.address_listeners[address]
        except KeyError:
            listeners = []

        for listener in listeners:
            listener(address, data)
263220
public void setReplyTo(String address, String personal) throws AddressException {
		replyTo = toInternetAddress(address, personal);
	}
132499
def send(self, message_data, delivery_mode=None):
        """"""
        self.publisher.send(message_data, delivery_mode=delivery_mode)
1098235
def write(self, out):
        """"""
        out.write_string(self.address, len(self.address))
580825
def send_reply_to(address, reply=EMPTY):
    
    _logger.debug("Sending reply %s to %s", reply, address)
    return sockets._sockets.send_reply_to(address, reply)
1241285
def send_data(self, message):
        '''
            
        '''
        #logger.debug("TX:\n%s", json.dumps(message, indent=2))
        data = json.dumps(message).encode('utf-8') + b'\n'
        self.transport.write(data)
789214
def send_msg(self, message):
        
        packet = self.driver.send(message)
        self.send_bytes(packet)
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]))
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
165736
public static SendRequest to(Address destination, Coin value) {
        SendRequest req = new SendRequest();
        final NetworkParameters parameters = destination.getParameters();
        checkNotNull(parameters, "Address is for an unknown network");
        req.tx = new Transaction(parameters);
        req.tx.addOutput(value, destination);
        return req;
    }