[jdev] my first step to jabber development...
Heiner Wolf
wolf at bluehands.de
Mon Apr 11 08:11:58 CDT 2005
>i am very new to jabber and i wanna write some soft (client) on C. As
>i know jabber is an XML streaming technology used for IM (and not
>only)... i have been looking for a client development and found
>iksemel and Loudmouth. As I know iksemel is a parser and no
>networking. Could anybody point me to some resource about writing
>jabber clients in C.
This is really a difficult question. I can give only a weak answer:
there is no Jabber networking course. There are hardly any network
programming courses online, but probably none that explains socket
programming with Jabber examples. My best advice is that you buy a
socket programming book for C, code the examples and learn the hard way
how to do that. Then you can send XML/Jabber data, receive the same, and
parse it with an XML stream parser.
What you basically do is something like:
main
{
int s = socket();
connect(s, ...);
while (1) {
write(s, ...);
read(s, ...);
parsexml();
}
}
But please note, that it won't work that simple. You must be able to
read without writing, so it must be either non-blocking I/O or read and
write in different threads. Also note that there is no simple function
like parsexml(). You can use Libraries (iksemel, Loudmouth) or the expat
XML parser. expat must be configured properly and it is really barebone
for XML stream parsing. More answers also depend on the system you are
programming. Linux, Windows, Mac ...?
hw
--
Dr. Klaus H. Wolf
bluehands GmbH & Co.mmunication KG
http://www.bluehands.de/people/hw
+49 (0721) 16108 75
--
Jabber enabled Virtual Presence on the Web: http://www.lluna.de/
Open Source Future History: http://www.galactic-developments.com/
More information about the JDev
mailing list