Skip to content

Instantly share code, notes, and snippets.

@saschagehlich
Created October 11, 2012 13:01
Show Gist options
  • Save saschagehlich/3872117 to your computer and use it in GitHub Desktop.
Save saschagehlich/3872117 to your computer and use it in GitHub Desktop.
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