Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
partial update to server example code
Browse files Browse the repository at this point in the history
  • Loading branch information
bjyoungblood committed Nov 15, 2011
1 parent 0f28f72 commit 37d382c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server-example.js
Expand Up @@ -27,16 +27,16 @@ var messageId = 0;

var shortyServer = shorty.createServer('config.json');

// all clientOn event handlers must be set up before calling shortyServer.start()
shortyServer.clientOn('bindRequest', function(client, callback) {
callback(true);
// all event handlers must be set up before calling shortyServer.start()
shortyServer.on('bind', function(client, callback) {
callback("ESME_ROK");
});

shortyServer.clientOn('deliverySuccess', function(mySms) {
shortyServer.on('deliverySuccess', function(mySms) {
console.log("sms marked as delivered: " + mySms.user_ref);
});

shortyServer.clientOn('receiveOutgoing', function(mySms, clientData, responseCallback) {
shortyServer.on('receiveOutgoing', function(mySms, clientData, responseCallback) {
console.log(sys.inspect(mySms));

// Any messages sent from this number will fail
Expand Down

0 comments on commit 37d382c

Please sign in to comment.