npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vhd-smpp-module-v1

v1.2.2

Published

smpp module for sending sms

Readme

/*

Vhd Smpp Module 1.0

This is a Node.js module for handling SMPP (Short Message Peer-to-Peer) connections to send and receive SMS messages. It provides an easy-to-use interface to interact with the SMPP server.

Installation

To use this module, you need to have Node.js installed on your system. You can install the module using npm:


npm install smpp
npm install async

Constructor Parameters

port: The port number of the SMPP server. host: The host address of the SMPP server. username: The username for authenticating with the SMPP server. password: The password for authenticating with the SMPP server. autoEnquirePeriod: The period (in milliseconds) for auto-enquiring the link. Default value is 10000 (10 seconds).

Usage

  1. To use the VhdSmpp module, follow these steps:

Import the module in your code:

const VhdSmpp = require('./path/to/vhd-smpp.js');
  1. Create an instance of the VhdSmpp class with the required parameters:

const port = 2775; // Port number of the SMPP server
const host = 'smpp.server.com'; // Host address of the SMPP server
const username = 'your_username'; // Your SMPP server username
const password = 'your_password'; // Your SMPP server password

const smppClient = new VhdSmpp(port, host, username, password);

  1. Initialize event listeners for the SMPP session:

smppClient.initListners();
  1. Connect to the SMPP server:
smppClient.connect();

5.Bind the SMPP session:

smppClient.bindSmpp();

6.Send an SMS message

const smsOptions = {
  destination: 'recipient_number', // Recipient's phone number
  message: 'Your SMS message goes here', // The SMS content
  source: 'your_source_number', // (optional) Sender's phone number
  scheduleDelivery: 'scheduled_date_time' // (optional) Schedule the SMS delivery
};

smppClient.sendMessage(smsOptions, (response) => {
  console.log(response); // Handle the response from the SMPP server
});


```bash

7. Define event handlers for specific events:

```bash

smppClient.onEvent('event_name', (data) => {
  // Handle the event with the received data
});
  1. Disconnect from the SMPP server when done:

smppClient.disconnect();

Auto Enquire Link Period

The autoEnquirePeriod parameter specifies the period (in milliseconds) for auto-enquiring the link. This feature helps in keeping the connection alive with the SMPP server. The default value is set to 10000 milliseconds (10 seconds). You can adjust this value as per your requirements during the initialization of the VhdSmpp instance.