simple-xmpp / node-simple-xmpp

Simple High Level NodeJS XMPP Client
301 stars 90 forks source link

Create multiple client connections #2

Open ashish01 opened 12 years ago

ashish01 commented 12 years ago

Expose something like create() in module.exports, so that with in a single js file multiple xmpp client connections can be made.

tttp commented 12 years ago

Hi,

What's the status? Is this taken into account, rejected, postponed until a new version...?

X+

soggie commented 12 years ago

This is important, because as of now this module is quite un-usable if you want to build multiple connections, and the thing is this is quite easy to remedy. I propose this: https://github.com/arunoda/node-simple-xmpp/pull/6

arunoda commented 12 years ago

please consider my requests. I'll approve this.

soggie commented 12 years ago

Will do as you ask. :)

Just kind of busy right now, gimme an hour or so.

arunoda commented 12 years ago

cool. for sure.

On Thu, Aug 9, 2012 at 3:15 PM, Ruben Tan Long Zheng < notifications@github.com> wrote:

Will do as you ask. :)

Just kind of busy right now, gimme an hour or so.

— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/node-simple-xmpp/issues/2#issuecomment-7609816.

Arunoda Susiripala

@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda

tttp commented 12 years ago

This issue can now be closed. Thanks @soggie

soggie commented 12 years ago

Funny, I didn't realize I forgot to put in the guide in readme.md, @arunoda

var xmpp = require('simple-xmpp');

var conn1 = new xmpp.SimpleXMPP();
var conn2 = new xmpp.SimpleXMPP();
ftalazol commented 11 years ago

Error in the second connection: events.js:73 throw new Error("Uncaught, unspecified 'error' event."); ^ Error: Uncaught, unspecified 'error' event. at EventEmitter.emit (events.js:73:15) at Client.connect (/home/ftalazol/nodejs/node_modules/simple-xmpp/lib/simple-xmpp.js:156:20) at Client.EventEmitter.emit (events.js:96:17) at Client.Connection.onStanza (/home/ftalazol/nodejs/nodemodules/node-xmpp/lib/xmpp/connection.js:225:14) at StreamParser.Connection.startParser (/home/ftalazol/nodejs/nodemodules/node-xmpp/lib/xmpp/connection.js:136:14) at StreamParser.EventEmitter.emit (events.js:96:17) at null. (/home/ftalazol/nodejs/nodemodules/node-xmpp/lib/xmpp/stream_parser.js:42:22) at EventEmitter.emit (events.js:96:17) at Parser.parse (/home/ftalazol/nodejs/node_modules/node-expat/lib/node-expat.js:18:22) at StreamParser.write (/home/ftalazol/nodejs/nodemodules/node-xmpp/lib/xmpp/stream_parser.js:78:26)