Matthew Hiles schrieb:
> Getting off topic here, but would JimTcl work better for compiling with emscripten?
>
If size and loading speed matters, I'd go for jimtcl probably.
But regarding the compilation, I had no trouble with Emtcl, apart from 3
linker doubles (strdoul, strstr and strtod were considered to be buggy
by emconfigure and Tcl provides its own functions then. Later in the
link step, emcc complains that these functions were already present. I
deleted the checks from
configure.in, ran autoconf and the linker errors
are gone. Not sure what effect this will have, but probably none,
because the "buggy" considerations were around pointers and pointers are
integers in emscripten).
Btw, I had linker doubles with jimtcl either, but I didn't follow up on
that.
Emtcl inherits many useful features from Tcl, which I need: TclOO,
sockets, [binary]...
Currently I try to get client sockets working. I figured out that they
are indeed functional: the [socket -async] command connects to a
websocket with the "binary" protocol. It is possible to connect and, by
some more tweaking, to send data, but fileevents are not fired
automatically. Anyway the data arrives on "system call" level, and I
managed to get the fileevent fired with [update] ([vwait] blocks the
browser).
I think that, if there would be an event loop running in a main()
function at module startup, it would be possible to use (web)sockets.
And [after <ms> <code>] would also work, because these are timer events.
(just a side remark, to get even more off topic ;)
--
EL