Recent

Author Topic: jabber xmpp support  (Read 22380 times)

izzy

  • Newbie
  • Posts: 2
jabber xmpp support
« on: October 04, 2006, 07:53:06 pm »
Hello

I have good idea :]
We haven't jabber component.
It is open source instant comunication protocol.

I am poor in coding components in lazarus :(
And I can't make that component.
But maby someone can write it :)

zzarr

  • Newbie
  • Posts: 5
RE: jabber xmpp support
« Reply #1 on: May 10, 2008, 11:32:34 am »
There still isn't a jabber component?

Greetings
Zzarr

j4ckr1pp3r

  • Newbie
  • Posts: 4
Re: jabber xmpp support
« Reply #2 on: May 25, 2009, 04:42:56 am »
I know it's a bit late,,but hey,, there is nothing wrong with shared, right  :D
For those who might still interested with xmpp, please try this unit  http://devi.web.id/files/uxmpp.zip
and don't forget to leave a comment here  :D

invarbrass

  • New member
  • *
  • Posts: 8
Re: jabber xmpp support
« Reply #3 on: June 03, 2009, 05:40:28 pm »
thanks! I was recently looking for xmpp stuffs.  ;D

evoshroom

  • Full Member
  • ***
  • Posts: 157
Re: jabber xmpp support
« Reply #4 on: July 08, 2012, 11:14:19 pm »
I've tried this out (using the version on GitHub that is slightly newer and comes with all the required libraries).

On Windows when I try to login I get output, but it doesn't connect:

=> <?xml version="1.0"?>
=> <stream:stream to="gmail.com"  xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"  version="1.0">
<= <stream:stream from="gmail.com" id="CA4CE82479239991" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism><mechanism>X-OAUTH2</mechanism></mechanisms></stream:features>
=> <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
<= <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
ERROR: 10091,
ERROR: 10054,Connection reset by peer
Logged out

On Mac I simply get an error with no output:

dxmpp
Semaphore init failed (possibly too many concurrent threads).

Leledumbo

  • Hero Member
  • *****
  • Posts: 8697
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: jabber xmpp support
« Reply #5 on: July 09, 2012, 08:20:44 am »
Quote
dxmpp
Semaphore init failed (possibly too many concurrent threads).
On *nix, chtreads unit must be used (and it has to be the first unit in the .lpr uses clause).

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: jabber xmpp support
« Reply #6 on: July 09, 2012, 08:34:57 am »
I've tried this out (using the version on GitHub that is slightly newer and comes with all the required libraries).
Also, a link to the github repository would be nice - if only for reference ;)

Thanks!
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

evoshroom

  • Full Member
  • ***
  • Posts: 157
Re: jabber xmpp support
« Reply #7 on: July 09, 2012, 08:39:54 am »
Thanks for the tip!  That at least got me output on the Mac side, though it is still not working on either side.  The output I get on the Mac is as follows:

=> <?xml version="1.0"?>
=> <stream:stream to="gmail.com"  xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"  version="1.0">
<= <stream:stream from="gmail.com" id="DBF626B9A9237ADF" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
<= <stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism><mechanism>X-OAUTH2</mechanism></mechanisms></stream:features>
=> <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
<= <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
ERROR: -2,
« Last Edit: July 09, 2012, 08:43:45 am by evoshroom »

evoshroom

  • Full Member
  • ***
  • Posts: 157
Re: jabber xmpp support
« Reply #8 on: July 09, 2012, 08:42:16 am »
I've tried this out (using the version on GitHub that is slightly newer and comes with all the required libraries).
Also, a link to the github repository would be nice - if only for reference ;)

Thanks!

Sure. https://github.com/devi/uxmpp

evoshroom

  • Full Member
  • ***
  • Posts: 157
Re: jabber xmpp support
« Reply #9 on: July 09, 2012, 09:58:51 am »
For anyone else following along I've figured out another big chunk of what was wrong.  To start I Googled for the protocol and once found followed along with the connection and what it should look like.  You can find out what a Google Talk connection should look like at the low-level here:

https://developers.google.com/cloud-print/docs/rawxmpp

Then, I noticed where the error occurred.  That is, it occurred right where the SASL Authentication Handshake should begin.  That suggested an error in the SSL Library or the SASL unit.  Some fiddling around with the SSL Library and I discovered this code in ssl_openssl_lib.pas (which is strait from the GitHub):

 
Code: [Select]
{$IFNDEF WIN32}
  DLLSSLName: string = 'libssl';
  DLLUtilName: string = 'libcrypto';
  {$ELSE}
  DLLSSLName: string = 'ssleay32.dll';
  DLLSSLName2: string = 'libssl32.dll';
  DLLUtilName: string = 'libeay32.dll';
  {$ENDIF}

Now, it seemed a little funny to me that Unix was the one using the DLL's, so I swapped it around.

Code: [Select]
{$IFNDEF UNIX}
  DLLSSLName: string = 'libssl';
  DLLUtilName: string = 'libcrypto';
  {$ELSE}
  DLLSSLName: string = 'ssleay32.dll';
  DLLSSLName2: string = 'libssl32.dll';
  DLLUtilName: string = 'libeay32.dll';
  {$ENDIF}

And guess what... It connected just fine.  At least on Windows it did.  I still have to check it out for Mac.
« Last Edit: July 09, 2012, 10:02:01 am by evoshroom »

evoshroom

  • Full Member
  • ***
  • Posts: 157
Re: jabber xmpp support
« Reply #10 on: July 09, 2012, 10:41:26 am »
Works on Mac now too and tested person-to-person messaging, which also works.  8-)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: jabber xmpp support
« Reply #11 on: July 09, 2012, 11:21:33 am »
Great! I have some use for a Jabber unit in FPC... going to remember this.

Perhaps this is something for the Lazarus CCR repository ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018