[tcljava-dev] Sockets in Jacl...
Brought to you by:
mdejong
From: Neil M. <NM...@uk...> - 2001-08-20 09:21:25
|
OK - I have hacked away at the weekend, and have come up with an implementation of sockets in Jacl. Both client and server sockets work (although I haven't run the socket tests on them yet). The error messages aren't what Tcl gives yet, and there are some limitations: * There is no fileevent command, so you can't handle more than one connection at a time on a server socket (at least, I couldn't figure out how). * The -async flag to client sockets is not implemented. * fconfigure doesn't do anything in current CVS jacl (apart from parse its arguments). I haven't updated it to add the socket-specific options. * Jacl seems to behave wrongly in terms of events. In the shell, TCL.ALL_EVENTS flag is passed when doing Notifier.doOneEvent(), which causes me to process socket connection events, even though these shouldn't be processed unless an event loop has been entered (with [vwait]). This is different behaviour to tclsh. Anyway, I'm gonna clean up the code, and then create a patch for anyone who wants a try. And if someone who has developer access to the TclJava project wants to add this, they're more than welcome (might need a bit of polishing first, though). PS - I've only tested so far on 1.2.6, so some of these issues may have gone away in CVS latest. "D. J. Hagberg" wrote: > > In article <9jpgqa$6jk$1...@ne...>, "Ilia says... > >Hello developers of Jacl! > >Is there any alpha version of Jacl that implements > >socket command? > > Not that I know of. It would certainly be a *nice* feature > to add to the lang, if someone has the time to do so. > > -=- D. J. ___________________________________________________ Neil Madden/UK/Contr/IBM nm...@uk... Internal: 248724 External: 01962 818724 MP 183, Hursley Manager: Beth Roberts |