We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › Allowing remote socket connection in an applet
Page Index Toggle Pages: 1
Allowing remote socket connection in an applet? (Read 1077 times)
Allowing remote socket connection in an applet?
Sep 7th, 2009, 8:18pm
 
In an applet, how should I go about opening a socket to a remote server through a socket? I know that this is a security restriction of java. Any pointers or links would be much appreciated. (Also I am not that good with socket, a good link to resources on this subject would be good too).
Re: Allowing remote socket connection in an applet?
Reply #1 - Sep 8th, 2009, 3:53am
 
You must at least sign the applet. And if you explain what you plan to do with this socket, information might be more precise.
Re: Allowing remote socket connection in an applet?
Reply #2 - Sep 8th, 2009, 7:26pm
 
I am just displaying the information on a graph, so it shouldn't be too difficult, right? (other than signning the applet). If possible I would also like to log the data... but is that asking too much?
Re: Allowing remote socket connection in an applet?
Reply #3 - Sep 9th, 2009, 2:07am
 
"what you plan to do with this socket", not with the gathered data...
If you just want to access a Web server, you can look at the Network library, it even has an example (HTTPClient) showing how to do it. You can pass parameters on the URL, analyse response, etc.

Logging the data from an applet might be hard: you don't know where to put the files, depending on the client system. And Java is quite restrictive on this, as you can mess up the system or introduce malware this way...
Page Index Toggle Pages: 1