Custom Configuration
The custom configuration for our c2s component contains three main
tags:
-
<authtime/> The first tag,
<authtime/>, allows us to specify a time limit within which the connecting client has to have completed the authentication procedure. This includes sending the initial document stream identifier with thejabber:clientnamespace. Setting this to, say, 10 seconds:<authtime>10</authtime>
will allow the client up to 10 seconds to authenticate, after which
c2swill drop the connection. Setting the time limit to 0 seconds, which can be accomplished with an empty tag:<authtime/>
effectively gives the client an unlimited amount of time within which to authenticate.
-
<karma/> The next tag we find in the
c2scomponent instance configuration is<karma/>. This is a way of controlling bandwidth usage through the connections and will be explained in Section 4.13 later in this chapter.-
<ip/> Then we come to the
<ip/>configuration tag:<ip port="5222"/>
The standard port for client connections is 5222. This is where it is specified—in the
portattribute. The<ip/>tag itself can contain an IP address or hostname. If you specify something like this:<ip port="5222">192.168.0.4</ip>
then only socket connections will be made to that specific combination of port and IP address. Not specifying an IP address means that the
c2sservice will bind to the port on all (INADDR_ANY) IP addresses on the host.You can specify more than one combination of port and IP address ...
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