A Typical Component Instance Description
Each component instance description follows the same approximate pattern:
Declaration of the component type
Identification (name) of the component
Specification of the host filter for packet reception
Definition of how the component is connected
Custom configuration for the component
Of course, for any generalized rule, there’s always an exception. The log component type, as mentioned earlier in this chapter, is defined slightly differently —while there is a host filter defined, a component connection definition is neither relevant nor present, and the custom configuration is limited; we’ll see this later when we take a tour of the jabber.xml.
Let’s have a closer look at the Client (to Server)
Connections
(c2s) component and how an instance of it is specified in the
jabber.xml. We’re going to use the one that is delivered in the Jabber 1.4.1 server
distribution tarball. Example 4-7
shows how the c2s is defined. The definition includes details of how
the component code is connected (using the library load
method) and
contains some custom configuration covering authentication timeout (the
<authtime/> tag), traffic flow control
(the <karma/> section), and what port
c2s is to listen on (the <ip/> tag).
We’ll look at these custom configuration tags in detail later.
<service id="c2s"> <load> <pthsock_client>./pthsock/pthsock_client.so</pthsock_client> </load> <pthcsock xmlns='jabber:config:pth-csock'> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access