Socket
Book a DemoInstallSign in
Socket

nativescript-xmpp-client

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-xmpp-client

XMPP websocket client plugin for Nativescript.

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
730
6.1%
Maintainers
1
Weekly downloads
 
Created
Source

An XMPP websocket client plugin for Nativescript

Installation

tns install nativescript-xmpp-client

Usage

import {Client, IQ} from "nativescript-xmpp-client";

....
   
       var client = new Client({
               websocket: {url: 'ws://127.0.0.1:5280'},
               jid: 'client2@127.0.0.1',
               password: 'secret'
           });
           
       client.on('online', function (data) {
           //Request roaster
           client1.send(new IQ({from: data.jid, type: 'get', id: 'rand'}).c('query', {xmlns: 'jabber:iq:roster'}));
       });
       
       client.on('stanza', function (stanza) {
           console.log(stanza.root().toString());
       });
           
       client.on('error', function (error) {
           console.log('client2', error)
       })

Keywords

NativeScript

FAQs

Package last updated on 14 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.