For background info on and examples of connecting to NXT-PLUS websocket server please see these posts on our blog.
The articles are written for FIMK but the same rules apply to NXT-PLUS.

http://fimkchat.com/2015/03/fimk-adds-websocket-support-to-its-core/

Available events

  • blockPushed Forwards event BLOCK_PUSHED, has limited data available. Response  consists of height and timestamp only.
  • blockPushedNew Forwards event BLOCK_PUSHED for blocks less than 1 day old. You would prefer to use this topic since the blockPushed event is also sent for each block while downloading a complete blockchain and while scanning the blockchain.
  • blockPushed-FIM-5PGB-BFNZ-KCSF-9XJWB Forwards event BLOCK_PUSHED for blocks generated by the appended account.
  • blockPopped Forwards event BLOCK_POPPED, has limited data available. Response  consists of height and timestamp only.
  • blockPoppedNew Forwards event BLOCK_POPPED for blocks less than 1 day old.
  • blockPopped-FIM-5PGB-BFNZ-KCSF-9XJWB Forwards event BLOCK_POPPED for blocks generated by the appended account.
  • addedUnconfirmedTransactions Forwards event ADDED_UNCONFIRMED_TRANSACTIONS. This allows you to listen to transactions as they arrive on the network in real time.
  • addedUnconfirmedTransactions-FIM-5PGB-BFNZ-KCSF-9XJWB Forwards event ADDED_UNCONFIRMED_TRANSACTIONS but only for transactions that have the added account as recipient or sender.
  • removedUnconfirmedTransactions Forwards event REMOVED_UNCONFIRMED_TRANSACTIONS. Internally transactions always go through the two states UNCONFIRMED and CONFIRMED. Before a transaction is moved from status UNCONFIRMED to CONFIRMED expect it first be removed from the UNCONFIRMED pool. In normal daily usage it is to be expected that transactions can go in and out of UNCONFIRMED status several times.
  • removedUnconfirmedTransactions-FIM-5PGB-BFNZ-KCSF-9XJWB Same as removedUnconfirmedTransactions but only for transactions where FIM-5PGB-BFNZ-KCSF-9XJWB is either the sender or recipient.
  • addedTrades Collects all trades in between two blocks and which are pushed less than 1 day ago. Since trades happen only when the block is created we can only notify you each block. To get around this limitation Mofowallet listens for unconfirmed buy/sell order transactions and cancellations of buy/sell orders. With this information we are still able to display instant feedback in the Asset Exchange.
  • addedTrades-FIM-5PGB-BFNZ-KCSF-9XJWB Same as addedTrades but without the rate limiter and only reporting trades where the seller or buyer is the appended account. The rate limiter is what causes to only report trades that are less than a day old.
  • addedTrades*13664938383416975974 Same as addedTrades-FIM-5PGB-BFNZ-KCSF-9XJWB but instead of limited to buyer or seller these trades are limited to an asset id.
  • removedUnconfirmedTransactions-FIM-5PGB-BFNZ-KCSF-9XJWB Same as removedUnconfirmedTransactions but only for transactions where FIM-5PGB-BFNZ-KCSF-9XJWB is either the sender or recipient.
  • addedTrades Collects all trades in between two blocks and which are pushed less than 1 day ago. Since trades happen only when the block is created we can only notify you each block. To get around this limitation Mofowallet listens for unconfirmed buy/sell order transactions and cancellations of buy/sell orders. With this information we are still able to display instant feedback in the Asset Exchange.
  • addedTrades-FIM-5PGB-BFNZ-KCSF-9XJWB Same as addedTrades but without the rate limiter and only reporting trades where the seller or buyer is the appended account. The rate limiter is what causes to only report trades that are less than a day old.
  • addedTrades*13664938383416975974 Same as addedTrades-FIM-5PGB-BFNZ-KCSF-9XJWB but instead of limited to buyer or seller these trades are limited to an asset id.

Live example

This sample shows how to use the RPC interface to call the `getBlockchainState` method and shows how to subscribe to a server side event. Many more code samples can be found here http://fimkchat.com/2015/03/connecting-to-fimk-websockets/.

To run the sample below click the Result tab.