Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
mrOrbit #1
Member since Jan 2006 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: OnPresence - subscribe
I use use OnPresence event to catch subscibe event.

But i have one issue. I want use it in web application.
On each user request i connection to server, process events, and close connection on OnRosterEnd.

But i think, that it doesn't correct for my case.

Could you advice me, how i could realize subscribe functionality for Web application case.
Avatar
Alex #2
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Subject: Re: OnPresence - subscribe
I use use OnPresence event to catch subscibe event.
thats correct

But i have one issue. I want use it in web application.
On each user request i connection to server, process events, and close connection on OnRosterEnd.

But i think, that it doesn't correct for my case.

Could you advice me, how i could realize subscribe functionality for Web application case.
normally a server sends outstanding requests (presence packets) after you sent your own presence. And you sent your own presence after you received the entire roster. You say that you disconnect after receiving the roster. So i assume you never send you own presence to the server and will never get this packets for this reason.

Why do you disconnect that early? Is there no way to keep the xmpp session and the agsXMPP object in a session of the webserver?
connecting and disconnecting all the time is not good.

Alex
Avatar
mrOrbit #3
Member since Jan 2006 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: OnPresence - subscribe
Thank you for explanation. Now i cleary understand my issue.

I want create connection on each user request (that simplest way to me, now i don't want create connection pool).

I don't understant how i can catch the moment when i should close connection.

At the present moment, i see only one solution - use time out.

May be you could advice something another?

--
Thank you in advance, Alexey.
Avatar
Alex #4
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

i you can explain us in detail what your web application is doing exactly we could advice you. But currenly i have no idea what you are doing, and why you want to close the connection.
Also AJAX technology could be very interesting for your webapp. Or XMPP HTTP Polling[1] if you dont want persistant connections.

Alex

[1] http://www.jabber.org/jeps/jep-0025.html
Avatar
charaka #5
Member since May 2006 · 3 posts
Group memberships: Members
Show profile · Link to this post
Hi i'm developing web application with ajax and i need show online status acording to clinet database. web app sholud show the online status of each client in google talk in the web app. with work using ajax
please help on this
thnx
Avatar
Alex #6
Member since Feb 2003 · 4447 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

you have to create a webservice or smth similar which connects with agsXMPP to GTalk. You must connect with a valid GTalk UserId. The webservice will get all presences from the users to which the UserId is subscribed to. Without subscription you get no presence in XMPP. You can store the presences in a database or retrieve them directly from the webservice.

Alex
Avatar
charaka #7
Member since May 2006 · 3 posts
Group memberships: Members
Show profile · Link to this post
Thanks for quick reply alex,

do u have sample code for build the web service for that to get presences for every client in database

thanx charaka
Avatar
Jabberer #8
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
You will find everything you need for XMPP in our MiniClient sample
Software Developer
AG-Software
Avatar
charaka #9
Member since May 2006 · 3 posts
Group memberships: Members
Show profile · Link to this post
Alex

    can't we get presences with out using gtalk account. be cause end client must not see this service client that use to connect gtalk server, is it posible. if so how can do that

thnx
Avatar
Jabberer #10
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
no you can't. You have to use an gtalk account until google publishes an API.
Software Developer
AG-Software
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS