# strophejs-plugin-ping

> A strophe.js plugin to provide XMPP Ping (XEP-0199)

Latest version **0.0.3** (published 2018-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install strophejs-plugin-ping
pnpm add strophejs-plugin-ping
yarn add strophejs-plugin-ping
bun add strophejs-plugin-ping
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2018-07-17 |
| First published | 2017-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Strophe plugin developers |
| Maintainers | jcbrand, omichelsen, strophe-admin, sualko |
| Keywords | strophe.js, plugin, xmpp |

## Links

- npm: https://www.npmjs.com/package/strophejs-plugin-ping
- Repository: https://github.com/strophe/strophejs-plugin-ping
- Homepage: https://github.com/strophe/strophejs-plugin-ping#readme
- Issues: https://github.com/strophe/strophejs-plugin-ping/issues
- npm.io page: https://npm.io/package/strophejs-plugin-ping

## Dependencies (1)

- [strophe.js](https://npm.io/package/strophe.js.md) ^1.2.12

## Recent versions

- 0.0.3 (latest) — 2018-07-17
- 0.0.1 — 2017-02-16

## README

# Strophe.ping.js

Strophe.ping.js is a plugin to provide XMPP Ping
( [ XEP-0199 ]( http://xmpp.org/extensions/xep-0199.html ) ).

## Usage

After you connected sucessfully to the XMPP server you can send a ping to a XMPP
client or server:

    connection.ping.ping( "serviceJID@server.org", success, error, timeout );

You can also add a ping handler to receive pings:

    connection.ping.addPingHandler( handler );

Within your ping handler function you surely want to reply with a pong iq:

    handler = function( ping ){
      ...
      connection.ping.pong( ping );
      ...
	  return true;
    }

---
_Source: https://npm.io/package/strophejs-plugin-ping · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
