Sends a stream message to a given address
544694
public void stream(OutputStream os,
                     HeadersAmp headers,
                     String from, 
                     long qId,
                     String address, 
                     String methodName,
                     PodRef podCaller,
                     ResultStream<?> result,
                     Object []args)
    throws IOException
  {
    init(os);

    OutH3 out = _out;

    if (out == null) {
      return;
    }
    
    if (log.isLoggable(Level.FINEST)) {
      log.finest("hamp-stream-w " + methodName + (args != null ? Arrays.asList(args) : "[]")
                + " {to:" + address + ", from:" + from + "}");
    }
    
    out.writeLong(MessageTypeHamp.STREAM.ordinal());
    writeHeaders(out, headers);

    writeFromAddress(out, from);
    out.writeLong(qId);
    
    writeMethod(out, address, methodName, podCaller);

    out.writeObject(result);

    writeArgs(out, args);
    
    //out.flushBuffer();
    out.flush();
  }
1098235
def write(self, out):
        """"""
        out.write_string(self.address, len(self.address))
1153202
@Override
  public void deliver(WriteStream os, OutHttp2 outHttp)
    throws IOException
  {
    // OutChannelHttp2 stream = _request.getStreamOut();
    
    int streamId = outHttp.nextStream(_request.channel());
    
    // http/1220
    _request.init(streamId);

    OutHeader outHeader = outHttp.getOutHeader();
    
    outHeader.openHeaders(streamId, getFlagsHttp());
    
    outHeader.header(":method", _method);
    outHeader.header(":scheme", "http");
    outHeader.header(":authority", _host);
    outHeader.header(":path", _path);
    
    if (_headers != null) {
      for (Map.Entry<String,String> entry : _headers.entrySet()) {
        outHeader.header(entry.getKey(), entry.getValue());
      }
    }
    
    outHeader.closeHeaders();
    
    if (getFlagsHttp() == FlagsHttp.END_STREAM) {
      // stream.closeWrite();
      _request.channel().closeWrite();
      // outHttp.closeWrite(streamId);
    }
  }
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;
    }
59086
def _send(self, data):
        """"""
        try:
            self._sock.sendto(data.encode('ascii'), self._addr)
        except (socket.error, RuntimeError):
            # No time for love, Dr. Jones!
            pass
1361555
def send_messages(self, email_messages):
        """"""
        if not email_messages:
            return
        with self._lock:
            try:
                stream_created = self.open()
                for message in email_messages:
                    if six.PY3:
                        self.write_message(message)
                    else:
                        self.write_message(message)
                    self.stream.flush()
                if stream_created:
                    self.close()
            except:
                if not self.fail_silently:
                    raise
        return len(email_messages)
198053
protected void sendDatagram (UpstreamMessage msg)
        throws IOException
    {
        // reset the stream and write our connection id and hash placeholder
        _bout.reset();
        _uout.writeInt(_client.getConnectionId());
        _uout.writeLong(0L);

        // write the datagram through the sequencer
        _sequencer.writeDatagram(msg);

        // flip the buffer and make sure it's not too long
        ByteBuffer buf = _bout.flip();
        int size = buf.remaining();
        if (size > Client.MAX_DATAGRAM_SIZE) {
            log.warning("Dropping oversized datagram", "size", size, "msg", msg);
            return;
        }

        // compute the hash
        buf.position(12);
        _digest.update(buf);
        byte[] hash = _digest.digest(_secret);

        // insert the first 64 bits of the hash
        buf.position(4);
        buf.put(hash, 0, 8).rewind();

        // send the datagram
        writeDatagram(buf);

        // notify the tracker
        _client.getMessageTracker().messageSent(true, size, msg);
    }
845805
def send_msg(self, address, args=[]):
        
        if not address.startswith('/'):
            address = '/{}'.format(address)
    
        msg = osc_message_builder.OscMessageBuilder(address=address)
    
        for arg in args:
            msg.add_arg(arg)
        self.conn.send(msg.build())
        return
308905
@Override
  public int addressRemote(byte []buffer, int offset, int length)
  {
    return _socket.getRemoteAddress(buffer, offset, length);
  }
1291386
@Override
  public void deliver(WriteStream os, OutHttp2 out)
    throws IOException
  {
    _stream.writeCont(out);
  }
179579
def _send_msg(self, header, payload):
        """"""

        if self.verbose:
            print('->', repr(header))
            print('..', repr(payload))
        assert header.payload == len(payload)
        try:
            sent = self.socket.send(header + payload)
        except IOError as err:
            raise ConnError(*err.args)

        # FIXME FIXME FIXME:
        # investigate under which situations socket.send should be retried
        # instead of aborted.
        # FIXME FIXME FIXME
        if sent < len(header + payload):
            raise ShortWrite(sent, len(header + payload))
        assert sent == len(header + payload), sent
598710
def set_address(addr):
    """"""
    # Send DNLOAD with first byte=0x21 and page address
    buf = struct.pack("<BI", 0x21, addr)
    __dev.ctrl_transfer(0x21, __DFU_DNLOAD, 0, __DFU_INTERFACE, buf, __TIMEOUT)

    # Execute last command
    if get_status() != __DFU_STATE_DFU_DOWNLOAD_BUSY:
        raise Exception("DFU: set address failed")

    # Check command state
    if get_status() != __DFU_STATE_DFU_DOWNLOAD_IDLE:
        raise Exception("DFU: set address failed")
377377
def send(self, message):
        
        self.socket.sendto(message.SerializeToString(), self.address)
        return None
1287423
def send(self, message, arguments=None):
        
        output = clips.data.DataObject(self._env)
        instance = clips.data.DataObject(
            self._env, dtype=CLIPSType.INSTANCE_ADDRESS)
        instance.value = self._ist

        args = arguments.encode() if arguments is not None else ffi.NULL

        lib.EnvSend(
            self._env, instance.byref, message.encode(), args, output.byref)

        return output.value
373302
private void sendRequest(String header, byte[] body) throws IOException {
        // Send entire message in one write, else suffer the fate of weird TCP/IP stacks.
        byte[] headerBytes = Utils.toBytes(header);
        byte[] requestBytes = headerBytes;
        if (body != null && body.length > 0) {
            requestBytes = new byte[headerBytes.length + body.length];
            System.arraycopy(headerBytes, 0, requestBytes, 0, headerBytes.length);
            System.arraycopy(body, 0, requestBytes, headerBytes.length, body.length);
        }
        
        // Send the header and body (if any) and flush the result.
        m_outStream.write(requestBytes);
        m_outStream.flush();
    }
523387
def streamserver_handle(cls, socket, address):
        ''''''
        request = cls.dummy_request()
        request._sock = socket
        server = None
        cls(request, address, server)
1275939
def _create_sending_stream(self, pub_addr):
        
        sock = self._zmq_context.socket(zmq.PUB)
        sock.setsockopt(zmq.IDENTITY, self.sender_id)
        sock.connect(pub_addr)
        stream = ZMQStream(sock, io_loop=self.io_loop)

        return stream