Created
October 11, 2012 13:01
-
-
Save saschagehlich/3872117 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
net = require 'net' | |
socket = net.connect host: 'bin-short.whatsapp.net', port: 5222 | |
socket.setKeepAlive true | |
socket.on 'connect', -> | |
console.log "Successfully connected to whatsapp server" | |
socket.on 'timeout', -> | |
console.log "Connection to whatsapp server timed out" | |
socket.on 'close', -> | |
console.log "Connection closed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment