private function end Send the last message at fixed intervals
198393
function gossipLastMessageAtFixedInterval(){
    if(p_phase_timeout >0 && Date.now() - p_phase_timeout > constants.BYZANTINE_PHASE_TIMEOUT){

        if(bByzantineUnderWay && last_prevote_gossip &&
            typeof last_prevote_gossip !== 'undefined' &&
            Object.keys(last_prevote_gossip).length > 0){
            if(last_prevote_gossip.type === constants.BYZANTINE_PREVOTE && h_p === last_prevote_gossip.h){
                // console.log("byllllogg gossipLastMessageAtFixedInterval broadcastPrevote" + JSON.stringify(last_prevote_gossip));
                broadcastPrevote(last_prevote_gossip.h, last_prevote_gossip.p, last_prevote_gossip.idv);
            }
        }
        if(bByzantineUnderWay && last_precommit_gossip &&
            typeof last_precommit_gossip !== 'undefined' &&
            Object.keys(last_precommit_gossip).length > 0){
            if(last_precommit_gossip.type === constants.BYZANTINE_PRECOMMIT && h_p === last_precommit_gossip.h){
                if(last_precommit_gossip.idv !== null && assocByzantinePhase[last_precommit_gossip.h].phase[last_precommit_gossip.p].proposal
                    && typeof assocByzantinePhase[last_precommit_gossip.h].phase[last_precommit_gossip.p].proposal !== 'undefined'){
                    var lastProposal = assocByzantinePhase[last_precommit_gossip.h].phase[last_precommit_gossip.p].proposal;
                    broadcastProposal(last_precommit_gossip.h, last_precommit_gossip.p, lastProposal, lastProposal.vp);
                }
                // console.log("byllllogg gossipLastMessageAtFixedInterval broadcastPrecommit" + JSON.stringify(last_precommit_gossip));
                broadcastPrecommit(last_precommit_gossip.h, last_precommit_gossip.p, last_precommit_gossip.sig, last_precommit_gossip.idv);
            }        
        }
    }
}
1231335
def __on_message(self, connection, sender, message):
        
        if message.strip() == '!bot send':
            cycle = itertools.cycle(string.digits)
            content = ''.join(next(cycle) for _ in range(100))
            self.send_message(sender, content)

        else:
            parts = message.split(':', 2)
            if not parts or parts[0] != 'HRLD':
                return

            if parts[1] == 'BEGIN':
                # Beginning of multi-line message
                self._queue[parts[2]] = []

            elif parts[1] == 'END':
                # End of multi-line message
                content = ''.join(self._queue.pop(parts[2]))
                self.__notify(sender, content)

            elif parts[1] == 'MSG':
                # Single-line message
                content = parts[2]
                self.__notify(sender, content)

            else:
                # Multi-line message continuation
                uid = parts[1]
                self._queue[uid].append(parts[2])
12741
private function handleSend()
    {
        $flow = null;
        if ($this->writtenFlow !== null) {
            $flow = $this->writtenFlow;
            $this->writtenFlow = null;
        }

        if (count($this->sendingFlows) > 0) {
            $this->writtenFlow = array_shift($this->sendingFlows);
            $this->stream->write($this->writtenFlow->getPacket());
        }

        if ($flow !== null) {
            if ($flow->isFinished()) {
                $this->loop->nextTick(function () use ($flow) {
                    $this->finishFlow($flow);
                });
            } else {
                $this->receivingFlows[] = $flow;
            }
        }
    }
559723
public void notifyEnd(String projectApiId, String projectVersion, String category, long duration) {
		try {
			if (isStarted()) {
				JSONObject endNotification = new JSONObject().
					put("project", new JSONObject().
						put("apiId", projectApiId).
						put("version", projectVersion)
					).
					put("category", category).
					put("duration", duration);
				
				socket.emit("run:end", endNotification);
			}
			else {
				LOGGER.log(Level.WARNING, "Probe Dock RT is not available to send the end notification");
			}
		}
		catch (Exception e) {
			LOGGER.log(Level.INFO, "Unable to send the end notification to the agent. Cause: " + e.getMessage());
			
			if (LOGGER.getLevel() == Level.FINEST) {
				LOGGER.log(Level.FINEST, "Exception:", e);
			}
		}
	}
832656
function setLast(method, arg, options) {
    last = {
      method: method,
      arg: arg,
      options: options,
      callback: options.callback,
      page: options.page || 1
    };

    options.method = method;

    if (caching) {
      var last_request = JSON.parse(sessionStorage.getItem('twitterlib.last_request') || '{}');
      if (last.method != last_request.method || last.arg != last_request.arg) {
        clearCache();
        sessionStorage.setItem('twitterlib.last_request', JSON.stringify(last));
      }
    }
  }
1112996
private CompletableFuture<Integer> send(boolean mapconvable, Object message, boolean last) {
        if (message instanceof CompletableFuture) {
            return ((CompletableFuture) message).thenCompose((json) -> {
                if (json == null || json instanceof CharSequence || json instanceof byte[]) {
                    return sendPacket(new WebSocketPacket((Serializable) json, last));
                } else if (message instanceof WebSocketPacket) {
                    return sendPacket((WebSocketPacket) message);
                } else {
                    return sendPacket(new WebSocketPacket(getSendConvert(), mapconvable, json, last));
                }
            }
1263305
function (i) {
    robot.adapter.send(data.context, messages_to_send[i]);

    if (messages_to_send.length > ++i) {
      setTimeout(function () { sendMessage(i); }, 300);
    }
  }
1371939
def send_line(self, line, ending=None):
        
        if ending is None:
            ending = self.LINE_ENDING
        return self.send(line + ending)
163432
def flush(self):
        
        # Flush buffer
        content = self._buffer.getvalue()
        self._buffer = StringIO()

        if content:
            # Send message
            self._client.send_message(self._target, content, mtype="chat")
1373826
function(event) {
        sendPingTimeout && clearTimeout(sendPingTimeout);
        socketCloseTimeout && clearTimeout(socketCloseTimeout);
        forceCloseTimeout && clearTimeout(forceCloseTimeout);
        eventCallback["close"](event);
      }
833951
def msg(self, *args, **kwargs):
        ""
        if self.timestamp is None or self._interval_reached():
            self.callback(*args, **kwargs)
            self.reset()
780089
function end(cb) {
  if(typeof cb === 'function') {
    this.once('disconnect', cb);
  }

  if(this.tcp) {
    // must call destroy to terminate immediately
    this._socket.destroy();
  }else{
    this._socket.end();
  }
}
744823
void setLastMessage(AVIMMessage lastMessage) {
    if (null != lastMessage) {
      if (null == this.lastMessage) {
        this.lastMessage = lastMessage;
      } else {
        if(this.lastMessage.getTimestamp() <= lastMessage.getTimestamp()) {
          this.lastMessage = lastMessage;
        }
      }
    }
  }
559246
protected function end()
	{
		\ManiaLive\Utilities\Logger::debug('end()');

		$this->showTansfertLabel(null, -50);
		foreach($this->storage->players as $player)
		{
			try
			{
				$this->connection->sendOpenLink((string) $player->login, '#qjoin='.$this->lobby->backLink, 1);
			}
			catch (\DedicatedApi\Xmlrpc\Exception $e)
			{
				//do nothing
			}
		}
		$this->connection->cleanGuestList();

		$this->match = null;
		$this->matchId = null;
		$this->matchMakingService->updateServerCurrentMatchId(
			null,
			$this->storage->serverLogin,
			$this->scriptName,
			$this->titleIdString
		);
		$this->connection->setForcedTeams(false);
		$this->sleep();
	}
565619
@Trivial
    protected void endTimings() {
        endTime = getTime();

        if (tc.isDebugEnabled()) {
            Tr.debug(tc, MessageFormat.format("Start time:  [ {0} ]", Long.valueOf(startTime)));
            Tr.debug(tc, MessageFormat.format("End time:    [ {0} ]", Long.valueOf(endTime)));
            Tr.debug(tc, MessageFormat.format("Delta time:  [ {0} ]", Long.valueOf(endTime - startTime)));
            Tr.debug(tc, MessageFormat.format("Stream time: [ {0} ]", Long.valueOf(streamTime)));
        }
    }
1318861
function send(type, res, str, mtime) {
  res.setHeader('Date', new Date().toUTCString());
  // Always assume we had compiled something that may have changed.
  res.setHeader('Last-Modified', mtime || (new Date()).toUTCString());
  // Would like to set the content length but it isn't clear how to do that
  // efficiently with JS strings (string length is not byte length!).
  res.setHeader('Content-Type', type);
  res.end(str);
}
1024794
public final CompletableFuture<Integer> send(Object message, boolean last) {
        return send(false, message, last);
    }