Project

General

Profile

where does ClientConnectionManager.processPacket function been called?

Raylin lin
Added about 5 years ago

hi all:

  I searched  keyword with processPacket in  tigase-server project(version 5.3), and can not find the place where ClientConnectionManager.processPacket function is called. Does this function been called by groovy script?   thank you.

Replies (9)

Added by Raylin lin about 5 years ago

Artur Hefczyc wrote:

AbstractMessageReceiver, line 1475

thank you for your relay.

I've found that sessionmanager and ClientConnectionManager have common base class AbstractMessageReceiver. but i don't know how do they(sm and clientconnectionmananger)

connect with each other? I guess sessionmanager gets the packet result from some Component,and sends it to the user client(spark) by ClientConnectionManager.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

All components are connected through MessageRouter a component as well, but this one decided which component processes which packet.

Added by Raylin lin about 5 years ago

thank you, I have checked the code,and it looks like that where MessageRouter decides which component(including ClientConnectManager and SessionManager) processes which packet is here:

tigase.server.MessageRouter.processPacket(Packet packet)

for (ServerComponent serverComponent : comps) {

            if (log.isLoggable(Level.FINEST)) {

                log.log(Level.FINEST, "2. Packet will be processed by: {0}, {1}",

                        new Object[] { serverComponent.getComponentId(),

                        packet });

            }

            serverComponent.processPacket(packet, results);

            if (results.size() > 0) {

                for (Packet res : results) {


                    // No more recurrential calls!!

                    addOutPacketNB(res);


                    // processPacket(res);

                }    // end of for ()

            }

        }

is that right? thank you.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

Yes, this is correct.

Added by Raylin lin about 5 years ago

thank you, the last question:

what is the difference among these(ClientConnnectionManager,ServiceConnectionManager,ClusterConnectionManager)?

I guess ClientConnectionManager sends processed packet to the user client(e.g. spark), and ClusterConnectionManager sends packet to other server in this cluster,then ServerConnectionManager?

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

server to server connections

Added by Raylin lin about 5 years ago

but ClusterConnectionManager is also about server to server connections. what is the difference? I guess ServiceConnectionManager also needs cluster(because there needs two or more servers).

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

ClusterConnectionManager is for connecting cluster nodes, servers which work as a single installation for the same DNS domains. All the servers work for one or more domains, all domains are served on all servers.

The ServerConnectionManager is for connecting separate XMPP installations which work for different domains, like jabber.org and gtalk.com and tigase.org, etc....

    (1-9/9)