W3C home > Mailing lists > Public > www-svg@w3.org > July 2004

SVG1.2 Socket implementation (number 2)

From: Jan-Klaas Kollhof <jan@kollhof.net>
Date: Sun, 18 Jul 2004 12:45:04 +0200
Message-ID: <40FA54B0.3080301@kollhof.net>
To: www-svg@w3.org

Hi people,

I would like to announce, that after a long night of coding I have 
sucessfully implemented the SVG1.2 sockets again.
After my, a bit uncomplete impl., using Batik's Java binding  from the 
script as seen at:
http://jan.kollhof.net/projects/svg/playground/svgnet.svg
and the wrapper module:
http://jan.kollhof.net/projects/svg/playground/jsolait/ext/svgnet.js
I have now taken a different approach.
I have two solutions, which work pretty much the same way.
Both use a Automation object which implements the socket interface and 
is exposed to the script.
In the first case I embedded ASV into an application, my motjuvie viewer:
http://jan.kollhof.net/projects/svg/motjuvie/index.xhtml
and added a socket factory function (createConnection) to the script 
environment.
For the second solution I put the Socket class in an ActiveX dll. After 
adding a little factory function:
function createConnection(){
    return  new ActiveXObject("SVGSockets.Socket");
}
one can then simply create the sockets using createConnection() as 
requested by the specs.
This works fine in IE using embedded SVG or standalone SVG.

The socket implements the EventTargetInterface(ignoring useCapture for 
addEventListener)
and the Socket interface.
For events I have ConnectionData, Connect, Connecting, Disconnect, Error.
I do not like the names so much and that they are capitalized, mousmove 
is not capitalized either ....

If anyone is interested to see it working and does not want to wait 
until SVGOpen, write me a couple lines.
If someone is seriously interested in using it, because it is quite 
usefull for doing C/S communication, and ...
then I am sure we can handle out something (btw, I am still looking for 
sponsors for the tokyo trip to the SVGOpen,
you can find my donate button on my page http://jan.kollhof.net )  :)


The


PS. demonstration code will follow.
Received on Sunday, 18 July 2004 06:43:01 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:54 UTC