This is out-dated documentation. Please go to http://jabberd.org/ for up-to-date documentation.
This is a simple daemon that manages incoming connections from clients. It can be used as a fast c2s connection manager for jabberd 1.4.x and other Jabber server implementations.
You should remove line 508 of clients.c:
printf("Reading %d bytes\n", read_len);
As this line causes SSL connections to break from time to time.
If you want to specify the configuration file on the command line,
you have to edit line 137 of jadc2s.c as well:
while((optchar = getopt(argc, argv, "c:r:bh?")) >= 0)
(a colon has been inserted in the string after the 'c')
Posted by Matthias Wimmer
on 2004-03-30 07:24
at least with gcc version 2.95.4 20011002 i had to move line 225
of conn.c (bad_conn_t bad_conn;) to the definition part of the
function (e.g. to line 203) in order for the build to succeed.
Posted by earl on
2004-03-31 09:13
After line 499 in clients.c, insert the following:
if (read_len > sizeof(buf))
read_len = sizeof(buf);
Otherwise, setting the max_bps to a number greater than 8192 (8 *
1024, which is sizeof(buf)) will cause jadc2s to overflow the read
buffer and (often) crash when the client sends more than 1 KB of
data at once.
Posted by Pablo
Herrero on 2004-10-08 18:40
It handles parsing the appropriate parts of the stream to process authentication requests and which connections have been authorized as a valid session.
The internals right now are stripped from the jabberd-1.4.x release, consisting of a simple main select loop that processes the socket events, and callbacks in expat to track incoming packets to handle them as auth or deliver them to a session manager.
For testing with jabberd-1.4.x create a file called c2s.xml configuring your main jabberd server to listen for component connections on port 5111:
<service id="jadc2s">
<accept>
<ip/>
<port>5111</port>
<secret>secret</secret>
</accept>
</service>
And start jabberd 1.4.x with the command line
./jabberd/jabberd -h yourhostname -i
c2s.xml
Now, edit jadc2s.xml to your liking, then start jadc2s:
./jadc2s
jadc2s will then connect to your Jabber server on port 5111 and listen for normal Jabber c2s connections on port 5221 (for testing).
If you need jadc2s to handle many c2s connections don't forget to raise its file handle limit (typically done with "ulimit -n 8192").
Note the Linux kernel 2.6 should not need "ulimit..." as its
file tables are expanded dynamically.
Posted by Maqi (admin) on 2003-11-25
08:48