jinterface problems

Rasmus Jonsson rasmus_jonsson@REDACTED
Fri Mar 14 17:44:10 CET 2003


Does really the higher java applet security (Sandbox) let you
open TCP sockets the way you discribe here below? I mean, this 
sounds quite straight forward doing it in a java application, 
but doesn´t the "applet thing" add extra difficulties to this 
task?

 --- Shawn Pearce <spearce@REDACTED> skrev: 
> Rasmus Jonsson <rasmus_jonsson@REDACTED> wrote:
> > What we actually are trying to accomplish is to let
> > any client (anywhere) download an java applet over http 
> > from a inets server on the erlang node, and then we 
> > want the java applet and the e-node to start communica-
> > ting. (here we cannot require any empd running on the
> > client!)

> The best idea would be to form a protocol between the applet
> and the Erlang server, which responds to clients using gen_tcp.
> Set {packet, 4} in gen_tcp and use the jinterface classes to
> serialize messages in java and send them with 4 byte length
> headers over a TCP socket.  In Erlang you can use term_to_binary
> and binary_to_term to convert back and forth.  This is essentially
> all the distribution system does, it just also automatically
> relays the message to the destination pid, as well as provide
> for linking and whatnot.
> 
> -- 
> Shawn.
> 
>   Avoid reality at all costs. 


_____________________________________________________
Gå före i kön och få din sajt värderad på nolltid med Yahoo! Express
Se mer på: http://se.docs.yahoo.com/info/express/help/index.html



More information about the erlang-questions mailing list