From: mikek on
Does anyone have any experience with making a socket server connection
from an applet embedded in a web page? Specifically, I am able to
establish the socket server connection without any problem - that is,
after signing the applet with a certificate. However, after leaving
the page and returning, the socket connection is always unavailable
(non bindable). The only way to re-establish a connection is to close
the web browser completely and re-open it. I've tried to close the
connection in the applet "stop()" callback, but to no avail.
From: EJP on
mikek wrote:
> (non bindable).

What exactly do you mean by this?
From: Richard Maher on
Hi Mikek,

"mikek" <mikaye(a)gmail.com> wrote in message
news:4d54e587-2b1d-4123-a8f2-2a266a90dcf1(a)d9g2000prh.googlegroups.com...
> Does anyone have any experience with making a socket server connection
> from an applet embedded in a web page? Specifically, I am able to
> establish the socket server connection without any problem - that is,
> after signing the applet with a certificate. However, after leaving
> the page and returning, the socket connection is always unavailable
> (non bindable). The only way to re-establish a connection is to close
> the web browser completely and re-open it. I've tried to close the
> connection in the applet "stop()" callback, but to no avail.

You don't need to sign an applet if it connects back to the codebase (which
can be a million miles away from the document base)

The reliance on stop/start maybe the problem but, FWIW, you can look at the
..java files at: -

http://manson.vistech.net/t3$examples/

CornuCopiae.java is the Applet and Tier3Socket.java does most of the Socket
work.

"Java Applets and Sockets" - It's all good!

Cheers Richard Maher

PS. Just wait for the: -

- Single-Signon without session-hijackable cookie bollocks?
- Single, persistent network connection across multiple active tabs in a
browser instance?
- Full-on synchronous of asynchrous i/o capability?
- 1:M relationship between messages sent to received?
- Retention of server-affinity if/when needed?

You know you want some of that!!!


From: mikek on
On Sep 10, 3:34 am, "Richard Maher" <maher...(a)hotspamnotmail.com>
wrote:
> Hi Mikek,
>
> "mikek" <mik...(a)gmail.com> wrote in message
>
> news:4d54e587-2b1d-4123-a8f2-2a266a90dcf1(a)d9g2000prh.googlegroups.com...
>
> > Does anyone have any experience with making a socket server connection
> > from an applet embedded in a web page? Specifically, I am able to
> > establish the socket server connection without any problem - that is,
> > after signing the applet with a certificate. However, after leaving
> > the page and returning, the socket connection is always unavailable
> > (non bindable). The only way to re-establish a connection is to close
> > the web browser completely and re-open it. I've tried to close the
> > connection in the applet "stop()" callback, but to no avail.
>
> You don't need to sign an applet if it connects back to the codebase (which
> can be a million miles away from the document base)
>
> The reliance on stop/start maybe the problem but, FWIW, you can look at the
> .java files at: -
>
> http://manson.vistech.net/t3$examples/
>
> CornuCopiae.java is the Applet and Tier3Socket.java does most of the Socket
> work.
>
> "Java Applets and Sockets" - It's all good!
>
> Cheers Richard Maher
>
> PS. Just wait for the: -
>
> - Single-Signon without session-hijackable cookie bollocks?
> - Single, persistent network connection across multiple active tabs in a
> browser instance?
> - Full-on synchronous of asynchrous i/o capability?
> - 1:M relationship between messages sent to received?
> - Retention of server-affinity if/when needed?
>
> You know you want some of that!!!

The reason for signing the applet is that, in this case, the applet is
opening a local server connection allowing other devices on the
network to connect to it (e.g. 192.168.1.102 might be the local IP
that allows a local network device to access the applet). What I meant
by non-bindable is that this is the error message in the java console
when the applet tries to open the server connection after, for
example, navigating away from the page and then returning to it. The
problem is that when navigating away from the page and then returning,
the applet thinks the connection is closed but the browser must be
keeping it open.
From: Roedy Green on
On Tue, 8 Sep 2009 11:51:53 -0700 (PDT), mikek <mikaye(a)gmail.com>
wrote, quoted or indirectly quoted someone who said :

>I've tried to close the
>connection in the applet "stop()" callback, but to no avail.

Perhaps you did not properly close the connection. Show us your
open/close code.
--
Roedy Green Canadian Mind Products
http://mindprod.com

"The coolest thing to do with your data will be thought of by someone else."
~ Rufus Pollock (born: 1978 age: 31) in Talk.