I’ve posted this entry before in the Smack forum with no too much successful, hope here I will get more chance and my question attract the people attention to solve some issues and questions regarding client Connections.
I would like to use a single shared TCP/IP socket opened by a high-resource device, in order to simultaneously host the loging, presence and communications of multiple XMPP client instances with different jids (all of them will belonging to the same domain).
For example email@example.com/Test1, firstname.lastname@example.org/Test2, email@example.com/Test4, firstname.lastname@example.org/Test3, etc… ,would all share a single client socket connected to the same server, over which authentication and presence stanzas for the multiple endpoints would be passed. This socket would be simultaneously able to handle inbound and outbound stanzas on behalf of the multiple XMPP endpoints it hosts.
After discussion, I was thinking to modify the client-side-library and more specifically the class XMPPConnection(),
but I find this solution a shame. This is how I think to proceed:
When a new client or intance (JID) wants to connect against the server, there is a high-resource device which manages the connection on behalf
–> test if there is any TCP-5222 connection already opened with the server --> if so, perform sothing like a fork()
and deals with stanzas as it was a new client --> send/receive outbound-inbound stanzas by this new “process handler”…
My questions: Does it enought or I have to modify also the Server side? Note that the Server receives a login connection from the same IP:Port. Is it anyhow of NAT the solution?
If so, and if I can’t not follow the server standards I will drop this idea since we need inter-XMPP-servers interopaerability
and not a simple closed solution.
I’ve been reading the forum entries and many people talks about Connection Managers and that’s the question I would like to get from the Server side experts…it is possible to have one CM which manage the connections in the client side?
or somehow imitate it’s behaviour in order to have one “big” connection?
Well, that’s. Thanks all for your reading and hopefully also for your replies and suggestions.