use similar interface like node-xmpp exposes
Merge pull request #46 from node-xmpp/common-interface

use similar interface like node-xmpp exposes