[JDEV] Re-using session - is it possible?

Sami Haahtinen ressu at ressukka.net
Fri Sep 13 15:07:16 CDT 2002

On Fri, Sep 13, 2002 at 06:10:00PM +0200, Sebastian Paul Avarvarei wrote:
> I have a new question now: is it possible to use the same connection
> to the server from different applications? For example, a server side
> PHP script does the Jabber login and then a Java applet continues to
> use the same connection which was already open. If the applet would
> know the Jabber session ID, can it somehow talk with the server
> without doing a new login?

By the nature of TCP streams, there is no way of doing this.

> What I'm trying to do is to avoid asking the visitor to login twice:
> once on the site itself and once in the Jabber client (the site
> already has member login). 

you could accomplish this by either building a custom made proxy in
between the applications and the actual Jabber server. Or by passing on
the parameters from the first login to the applet and make the applet
use those parameters to log in.

But with vanilla jabber, using TCP streams, it is not possible.

ofcourse, you can always attempt to add support for additional protocols
(like the ICMP ping) which do not have the same limitations as TCP =)


			  -< Sami Haahtinen >-
      -[ Notify immediately if you do not receive this message ]-
	-< 2209 3C53 D0FB 041C F7B1  F908 A9B6 F730 B83D 761C >-

More information about the JDev mailing list