Sends an ack message for the current received count.
540736
private void ack() {
    // Send a message to the other side of the connection indicating the
    // last message that we received in order. This will allow it to
    // purge messages we've already received from its queue.
    if (open && connected) {
      if (log.isDebugEnabled()) {
        log.debug(String.format("%s - Acking messages up to: %d", this, lastReceived));
      }
      eventBus.send(outAddress, new JsonObject().putString("action", "ack").putNumber("id", lastReceived));
      lastFeedbackTime = System.currentTimeMillis();
    }
  }
423072
@Override
    public synchronized void receiveAck(int blockIndex) {
        SendWork work = m_outstandingWork.get(blockIndex);

        // releases the BBContainers and cleans up
        if (work == null || work.m_ackCounter == null) {
            rejoinLog.warn("Received invalid blockIndex ack for targetId " + m_targetId +
                    " for index " + String.valueOf(blockIndex) +
                    ((work == null) ? " already removed the block." : " ack counter haven't been initialized."));
            return;
        }
        if (work.receiveAck()) {
            rejoinLog.trace("Received ack for targetId " + m_targetId +
                    " removes block for index " + String.valueOf(blockIndex));
            m_outstandingWorkCount.decrementAndGet();
            m_outstandingWork.remove(blockIndex);
            work.discard();
        }
        else {
            rejoinLog.trace("Received ack for targetId " + m_targetId +
                    " decrements counter for block index " + String.valueOf(blockIndex));
        }
    }
1236323
def send_jsonified(self, msg, stats=True):
        
        assert isinstance(msg, basestring), 'Can only send strings'

        if isinstance(msg, unicode):
            msg = msg.encode('utf-8')

        if self._immediate_flush:
            if self.handler and self.send_queue.is_empty():
                # Send message right away
                self.handler.send_pack('a[%s]' % msg)
            else:
                self.send_queue.push(msg)
                self.flush()
        else:
            self.send_queue.push(msg)

            if not self._pending_flush:
                reactor.callLater(0, self.flush)
                self._pending_flush = True

        if stats:
            self.stats.packSent(1)
1025330
void notifyOmemoMucMessageReceived(MultiUserChat muc,
                                       Stanza stanza,
                                       OmemoMessage.Received decryptedMessage) {
        for (OmemoMucMessageListener l : omemoMucMessageListeners) {
            l.onOmemoMucMessageReceived(muc, stanza, decryptedMessage);
        }
    }
1111553
def _receive_callback(self, raw_message):
        """"""
        message = self.backend.message_to_python(raw_message)
        if self.auto_ack and not message.acknowledged:
            message.ack()
        try:
            decoded = message.decode()
        except Exception, exc:
            if not self.on_decode_error:
                raise
            self.on_decode_error(message, exc)
        else:
            self.receive(decoded, message)
1169486
def send_notification(self, method, args, kwargs):
        """"""
        msg = dumps([1, method, args, kwargs])
        self.send(msg)
1350173
public void sendAckData(List<Object> objs) {
        if (!isAckRequested() || !sended.compareAndSet(false, true)) {
            return;
        }
        Packet ackPacket = new Packet(PacketType.MESSAGE);
        ackPacket.setSubType(PacketType.ACK);
        ackPacket.setAckId(originalPacket.getAckId());
        ackPacket.setData(objs);
        client.send(ackPacket);
    }
861154
def send_command_ack(self, device_id, action):
        """"""
        # serialize commands
        yield from self._ready_to_send.acquire()
        acknowledgement = None
        try:
            self._command_ack.clear()
            self.send_command(device_id, action)

            log.debug('waiting for acknowledgement')
            try:
                yield from asyncio.wait_for(self._command_ack.wait(),
                                            TIMEOUT.seconds, loop=self.loop)
                log.debug('packet acknowledged')
            except concurrent.futures._base.TimeoutError:
                acknowledgement = {'ok': False, 'message': 'timeout'}
                log.warning('acknowledge timeout')
            else:
                acknowledgement = self._last_ack.get('ok', False)
        finally:
            # allow next command
            self._ready_to_send.release()

        return acknowledgement
1279232
public void sendAckExpectedMessage(
    long ackExpStamp,
    int priority,
    Reliability reliability,
    SIBUuid12 stream)
    throws SIResourceException
  {

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "sendAckExpectedMessage",
        new Object[] {
          new Long(ackExpStamp),
          _targetMEUuid,
          new Integer(priority),
          reliability });

    ControlAckExpected ackexpMsg;
    try
    {
      ackexpMsg = _cmf.createNewControlAckExpected();
    }
    catch (Exception e)
    {
      // FFDC
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.impl.PubSubOutputHandler.sendAckExpectedMessage",
        "1:676:1.164.1.5",
        this);

      SibTr.exception(tc, e);
      SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
        new Object[] {
          "com.ibm.ws.sib.processor.impl.PubSubOutputHandler",
          "1:683:1.164.1.5",
          e });

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "sendAckExpectedMessage", e);

      throw new SIResourceException(
        nls.getFormattedMessage(
          "INTERNAL_MESSAGING_ERROR_CWSIP0002",
          new Object[] {
            "com.ibm.ws.sib.processor.impl.PubSubOutputHandler",
            "1:694:1.164.1.5",
            e },
          null),
        e);
    }

    // As we are using the Guaranteed Header - set all the attributes as 
    // well as the ones we want.
    SIMPUtils.setGuaranteedDeliveryProperties(ackexpMsg,
        _messageProcessor.getMessagingEngineUuid(), 
        null,
        stream,
        null,
        _destinationHandler.getUuid(),
        ProtocolType.PUBSUBINPUT,
        GDConfig.PROTOCOL_VERSION);
   
    ackexpMsg.setTick(ackExpStamp);
    ackexpMsg.setPriority(priority);
    ackexpMsg.setReliability(reliability);
    
    // SIB0105
    // Update the health state of this stream 
    InternalOutputStream sourceStream = (InternalOutputStream)_internalOutputStreamManager
                                              .getStreamSet(stream, false)
                                              .getStream(priority, reliability);
    if (sourceStream != null)
    {
      sourceStream.setLatestAckExpected(ackExpStamp);
      sourceStream.getControlAdapter()
        .getHealthState().updateHealth(HealthStateListener.ACK_EXPECTED_STATE, 
                                       HealthState.AMBER);
    }

    // If the destination in a Link add Link specific properties to message
    if( _isLink )
    {
      ackexpMsg = (ControlAckExpected)addLinkProps(ackexpMsg);
    }
    // Send ackExpected message to destination
    // Using MPIO

    //add a target cellule to the array for sending
    SIBUuid8[] fromTo = new SIBUuid8[1];
    fromTo[0] = _targetMEUuid;

    // Send the message to the MessageTransmitter
    _mpio.sendDownTree(fromTo,
                         priority,
                         ackexpMsg);


    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "sendAckExpectedMessage");

  }
763005
def __recv_cb(self, msg):
        
        try:
            self.__msg_callback(msg)
        except:
            logger.exception("AmqpLink.__recv_cb exception calling msg_callback")
        finally:
            # only works if all messages handled in series
            self.__last_id = msg.delivery_tag
            self.__unacked += 1
30588
def send_messages(self, messages):
        
        counter = 0
        for message in messages:
            res, _ = self._send(message)
            if res:
                counter += 1

        return counter
448822
@Service
    public String ackTaskReceived(String taskId, String workerId) {
        LOGGER.debug("Ack received for task: {} from worker: {}", taskId, workerId);
        return String.valueOf(ackTaskReceived(taskId));
    }
34211
def receive_message(self, msg):
        """"""
        _LOGGER.debug('Starting X10Device.receive_message')
        if hasattr(msg, 'isack') and msg.isack:
            _LOGGER.debug('Got Message ACK')
            if self._send_msg_lock.locked():
                self._send_msg_lock.release()
        callbacks = self._message_callbacks.get_callbacks_from_message(msg)
        _LOGGER.debug('Found %d callbacks for msg %s', len(callbacks), msg)
        for callback in callbacks:
            _LOGGER.debug('Scheduling msg callback: %s', callback)
            self._plm.loop.call_soon(callback, msg)
        self._last_communication_received = datetime.datetime.now()
        _LOGGER.debug('Ending Device.receive_message')
62074
def send_up(self, count):
                
        for i in range(count):
            self.interface.send_key(Key.UP)
357794
def _wet_message_received(self, msg):
        """"""
        for callback in self._dry_wet_callbacks:
            callback(LeakSensorState.WET)
        self._update_subscribers(0x13)
1051313
public void sendAck(Request arg0) throws SipException {
		if (tracer.isInfoEnabled()) {
			tracer.info(this+" sending ACK:\n"+arg0);
		}
		wrappedDialog.sendAck(arg0);
	}
748665
public void sendAckExpectedMessage(long ackExpStamp,
                                     int priority,
                                     Reliability reliability,
                                     SIBUuid12 stream) // not used for ptp
  throws SIResourceException
  {

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "sendAckExpectedMessage",
    new Object[] { new Long(ackExpStamp),
                   new Integer(priority),
                   reliability });

    if( routingMEUuid != null )
    {
      ControlAckExpected ackexpMsg;
      try
      {
        ackexpMsg = cmf.createNewControlAckExpected();
      }
      catch (Exception e)
      {
        // FFDC
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.PtoPOutputHandler.sendAckExpectedMessage",
          "1:733:1.241",
          this);

        SibTr.exception(tc, e);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          SibTr.exit(tc, "sendAckExpectedMessage", e);
      
        SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
          new Object[] {
            "com.ibm.ws.sib.processor.impl.PtoPOutputHandler",
            "1:744:1.241",
            e });
      
        throw new SIResourceException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0002",
            new Object[] {
              "com.ibm.ws.sib.processor.impl.PtoPOutputHandler",
              "1:752:1.241",
              e },
            null),
            e);
      }

      // As we are using the Guaranteed Header - set all the attributes as
      // well as the ones we want.
      SIMPUtils.setGuaranteedDeliveryProperties(ackexpMsg,
          messageProcessor.getMessagingEngineUuid(), 
          targetMEUuid,
          stream,
          null,
          destinationHandler.getUuid(),
          ProtocolType.UNICASTINPUT,
          GDConfig.PROTOCOL_VERSION);
   
      ackexpMsg.setTick(ackExpStamp);
      ackexpMsg.setPriority(priority);
      ackexpMsg.setReliability(reliability);
      
      // SIB0105
      // Update the health state of this stream 
      SourceStream sourceStream = (SourceStream)sourceStreamManager
                                                .getStreamSet()
                                                .getStream(priority, reliability);
      if (sourceStream != null)
      {
        sourceStream.setLatestAckExpected(ackExpStamp);
        sourceStream.getControlAdapter()
          .getHealthState().updateHealth(HealthStateListener.ACK_EXPECTED_STATE, 
                                         HealthState.AMBER);
      }

      // If the destination in a Link add Link specific properties to message
      if( isLink )
      {
        ackexpMsg = (ControlAckExpected)addLinkProps(ackexpMsg);
      }
        
      // If the destination is system or temporary then  the 
      // routingDestination into th message
      if( this.isSystemOrTemp )
      {
        ackexpMsg.setRoutingDestination(routingDestination); 
      }
    
      // Send ackExpected message to destination
      // Using MPIO
      mpio.sendToMe(routingMEUuid, priority, ackexpMsg );
 
    }
    else
    {
      if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.debug(tc,"Unable to send AckExpected as Link not started");
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "sendAckExpectedMessage");

  }