Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
MadProg #1
Member since Dec 2014 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: help "agsXMPP 1.3.1.0" Multiple connection/sockets
Hi Ags,

I want to how to login multiple accounts using agsXMPP.dll   V1.3.1.0

by using multiple sockets or connection. peviously i used.

  1. private Collection<XmppClientConnection> XMPP = new Collection<XmppClientConnection>();

tell me this is wrong or right ?

and what is private and public , static?

i mean

  1. private Collection<XmppClientConnection> XMPP = new Collection<XmppClientConnection>();

and

  1. public Collection<XmppClientConnection> XMPP = new Collection<XmppClientConnection>();

and

  1. static XmppClientConnection XMPP = new XmppClientConnection();

thanks
This post was edited 2 times, last on 2015-01-24, 10:00 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You need to create a new XmppClientConnection instance for each account you want to login.

Alex
Avatar
MadProg #3
Member since Dec 2014 · 7 posts
Group memberships: Members
Show profile · Link to this post
I dont want to use single connection for each account to login.

I want to use collection of connection.
Connection for each accounts
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by MadProg:
I dont want to use single connection for each account to login.
you have to, there is no other way.

Quote by MadProg:
I want to use collection of connection.
Connection for each accounts
where is the problem?
Create a new XmppClientconnection instance for each new connection and put it in a collection (List<XmppClientConnection>)

Alex
Avatar
MadProg #5
Member since Dec 2014 · 7 posts
Group memberships: Members
Show profile · Link to this post
Hey Alex

what is the meaning of this 2 methods to connect JID
1.
  1. private XmppClientConnection madprog;
  2.        
  3. public static XmppClientConnection y = new XmppClientConnection();


sometimes i am using only

  1. XmppClientConnection madprog = new XmppClientConnection();


2.

  1. XmppClientConnection xmpp = new XmppClientConnection("xyz.com", 5222);




these are methods im using to connect JID

whats the difference between this methods ?

please tell me..


madprog
This post was edited on 2015-01-30, 14:55 by Alex.
Avatar
MadProg #6
Member since Dec 2014 · 7 posts
Group memberships: Members
Show profile · Link to this post
i am using AgsXMPP 1.3.1.0 can you tell me, which method is supported to this version to connect JID ?
Avatar
Alex #7
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
a collection is just a data structure which manages your multiple XMPP collections.
It could be anything like a List, Hashtable, Array, Dictionary. Whatever you think works best for your use case.

sample

  1. var List<Jid, XmppClientConnection> connections = new List<Jid, XmppClientConnection>();
  2. connections.Add("me@server.com/resourse", xmppClient);
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS