[JDEV] ICQ Transport with Jabber 1.2
Keith Minkler
keith at digix.dyndns.org
Mon Nov 13 12:30:45 CST 2000
Eric, (et all)
If you mean getting the ehandler_new_ex() function to connect to Jabberd, I would be glad to offer an explanation of how that is done...
first, this function in libetherx was modified to take a port argument, and the internals of libetherx were modified so that, if the transport connects to the server on port 5269, it will use the 1.0 transport style, if it connects to any other port, it will use the jabberd style (i.e. base_accept).
next, in your jabberd config file, you will need a service item, such as:
<service id="icq.jabber.com">
<accept>
<port>9000</port>
<ip>12.34.56.78</ip>
<secret>icq-accept</secret>
</accept>
</service>
this tells jabberd to listen for incoming component connections on port 9000, of ip 12.34.56.78. and to only allow transports with the secret "icq-accept", note that multiple service items can listen on the same ip and port, as long as they use different "etherx" secrets, they can be distinguished between each other...
now, in icq transport (or anything else using ehandler_new_ex(), you should provide configuration for the following things:
etherx host (usually defaults to 127.0.0.1)
etherx secret (can default to test?)
etherx port (should default to 5269)
this way, you can always call ehandler_new_ex(..., port); and default it to 5269, since when the port is 5269, libetherx uses the 1.0 style transport connection, (etherx, instead of base_accept for 2.0)
this is how the majority of transports are connecting to the jabber.org server, currently.
in the 1.3+ server, there will be a cool thing called MIO (managed i/o), to replace the libetherx tstream functions, it acts as a frontend to all socket calls, and implements (currently) a select loop behind the scenes.. (this will be updated to allow *any* backend -- polld, select, sig-io, etc), but, a component MUST be a jabberd loadable .so object to take advantage of that...
for the 1.4 release however, we are hoping to have ALL transports/agents updated to be jabberd loadable .so components... this makes things much easier..
I dunno if i can clearly explain how to create a loadable .so just yet, but if you are curious, I rewrote svc_irc, irc-t, and groupchat as loadable modules.... (located in irc-jabber and conferencing modules) so you can check those out, the biggest points to look at are, the init.c file, which is where the majic happens.. irc-jabber gives an example of a jabberd component that has sub-modules, much like jsm, it has different modules, one for only parsing IRC, one for the transport, and one for the gateway (svc). Groupchat is a more simple example. the other big thing to note, is.. since you are connecting right to jabberd, you must include the jabberd.h file, and you no longer use libetherx, you must call deliver(dpacket_new(x),i); to deliver a packet, instead of ehandler_send... (where x is an xmlnode, and i is your instance you get from jabberd).
Hope this helps everyone,
Keith (please mail futher questions to this group)
On Mon, Nov 13, 2000 at 10:00:18AM -0700, Eric Bowersox wrote:
> Since I myself have not yet gotten the ICQ transport to work with the 1.2
> server, I can't really answer that question yet.
>
> The old ICQ transport cannot connect to a 1.2 server. I have put code in
> the new ICQ transport that will allow it to connect to the 1.2 server under
> the right conditions, but we have been unable thusfar to get it to work.
> (This, incidentally, is one of the major stumbling blocks that keeps me from
> releasing the new transport at this time.)
>
> Eric
>
> -----Original Message-----
> From: Vincent Lim's Yahoo [mailto:happiedwf at yahoo.com]
> Sent: Sunday, November 12, 2000 11:22 PM
> To: dennis.noordsij at wiral.com; jdev at jabber.org
> Subject: [JDEV] ICQ Transport with Jabber 1.2
>
>
> Hi,
>
> I noticed your posting about getting the ICQ transport to work with Jabber
> 1.2.
> I tried too, and was able to get the ICQ Transport to compile.
>
> After starting up the jabberd daemon, I started up the ICQ transport.
> Everything went smoothly.
> I noticed that the jabberd daemon acknowledge that the ICQ transport coming
> online because the
> debug mode showed something like '...legacy server incoming connection
> established from .....'.
>
> On connecting a JabberIM client to my jabber server, I tried to register the
> ICQ service, but I get an error.
> The error shows .....502: Remote Server Error.
>
> Is there something I need to do?
> And, since there is no more separate etherx component in Jabber 1.2, where
> do you specify
> the 'secret' key, which is present in icq_transport.xml?
>
>
> Regards
> Vincent
>
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list