Respond to the PING command.
961963
function execute(req, res) {
  if(req.args.length) return res.send(null, req.args[0]);
  res.send(null, Constants.PONG);
}
1250435
def send_ping(self, payload=''):
        
        self.send_frame(ControlFrame(OPCODE_PING, payload),
                        lambda: self.onping(payload))
        self.ping_payload = payload
        self.ping_sent = True
1130217
def ping(self, event):
        """"""

        self.log('Client ping received:', event.data, lvl=verbose)
        response = {
            'component': 'hfos.ui.clientmanager',
            'action': 'pong',
            'data': [event.data, time() * 1000]
        }

        self.fire(send(event.client.uuid, response))
675551
def ping(cls, host=None, count=1):
        
        option = '-n' if platform.system().lower() == 'windows' else '-c'
        return cls.execute('ping',
                           "{option} {count} {host}".format(option=option,
                                                            count=count,
                                                            host=host))
999874
function (options, callbackFn) {

            var self = this;
            request.get(options.hostAndPort + '/ping',
                function (error, response) {

                    if (response && response.statusCode === 200) {    //server up

                        callbackFn && callbackFn.call(self, true);
                    }
                    else {    //server down
                        callbackFn.call(self, false);
                    }
                });
            return this;
        }
707854
@Override
	public SolrPingResponse ping(String collection) {
		return execute(client -> new SolrPing().process(client, collection));
	}
797825
def ping(self, message=_NOTSET, *, encoding=_NOTSET):
        
        if message is not _NOTSET:
            args = (message,)
        else:
            args = ()
        return self.execute('PING', *args, encoding=encoding)
532944
async def respond(self, *args, **kwargs):
        
        return await self._client.send_message(
            await self.get_input_chat(), *args, **kwargs)
28723
function execute(req, res) {
  req.conn.monitor(this);
  res.send(null, Constants.OK);
}
305048
def control(self, key):
        """"""
        if not self.connection:
            raise exceptions.ConnectionClosed()

        payload = b"\x00\x00\x00" + self._serialize_string(key)
        packet = b"\x00\x00\x00" + self._serialize_string(payload, True)

        logging.info("Sending control command: %s", key)
        self.connection.send(packet)
        self._read_response()
        time.sleep(self._key_interval)
196152
def ping(timeout=nil)
      request = Message::Ping.new(Thread.mailbox)
      send_request request, :request, timeout
    end
1189345
function _ping_count(){

    if( count_url && typeof(count_url) === 'string' && count_url !== '' ){

	request({
	    url: count_url
	}, function(error, response, body){
	    if( error || response.statusCode !== 200 ){
		console.log('Unable to ping: ' + count_url);
	    }else{
		console.log('Pinged: ' + count_url);
	    }
	});
    }else{
	console.log('Will not ping home.');
    }
}
1182882
def respond(self, packet, peer, flags=0):
        
        self.sock.sendto(packet, flags, peer)
70498
def ping(self):
    

    msg = "PING\0"
    self.sfile.write(msg)

    ret, output = self.__response__()
    reply = str(output[0])

    if ret:
      msg = "Error pinging server %d:%s" % (ret, reply)
      raise LDBDClientException, msg

    return reply
272332
function ping() {
        result = fn.apply(context || this, args || []);
        context = args = null;
        executed = true;
      }
606285
function ping(options, callback) {
  const args = utils.getArgs(options, [config], callback);
  const url = `http://${args.options.ip}:${args.options.port}/ping`;

  return request.get(url, function(err) {
    if (err) {
      if (err.code === "ECONNREFUSED") {
        return args.callback(null, { running: false });
      }
      return args.callback(err);
    }
    return args.callback(null, { running: true });
  });
}
1304466
public static function ping()
    {
        self::init();

        //====================================================================//
        // Simple Message reply, No Encryption
        Splash::log()->msg("Ping Successful.");
        self::$Outputs->result = true;

        //====================================================================//
        // Transmit Answer with No Encryption
        return Splash::ws()->pack(self::$Outputs, true);
    }