Thread: [tcljava-user] fileevent and sockets in jacl
Brought to you by:
mdejong
From: Marc Z. <mz...@pa...> - 2006-03-23 15:47:58
|
Hallo Are the commands socket and fileevent now full work in the=20 newest release? I have a little test script with fileevent and server socket and it does no= t=20 work correct. I become the following message when I make a connection from = a=20 telnet to this script: proc Start_Server {port} { global Server set Server(main) [socket -server Accept $port] } proc Accept {sock addr port} { global Clients puts "Accept $sock from $addr port $port" set Clients(addr,$sock) [list $addr $port] fconfigure $sock -buffering line fileevent $sock readable [list ClientEvent $sock] } proc ClientEvent {sock} { global Clients if {[eof $sock] || [catch {gets $sock line}]} { # end of file or abnormal connection drop close $sock puts "Close $sock from [lindex $Clients(addr,$sock) 0] port\ [lindex $Clients(addr,$sock) 1]" catch {unset echo(addr,$sock)} } else { if {[string length $line]} { puts "Data from $sock:$line" puts $sock $line flush $sock } } } =2D--------------message: Start_Server 40666 set Run 1 puts "Started at [clock format [clock seconds] -format "%Y%m%d-%H%M%S"]" vwait Run puts "Stopped at [clock format [clock seconds] -format "%Y%m%d-%H%M%S"]" Started at 20060323-151326 Accept sock1 from 127.0.0.1 port 51679 tcl.lang.TclException =A0 =A0 =A0 =A0 at tcl.lang.ReturnCmd.cmdProc(ReturnCmd.java:99) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:818) =A0 =A0 =A0 =A0 at tcl.lang.Parser.eval2(Parser.java:1221) =A0 =A0 =A0 =A0 at tcl.lang.Procedure.cmdProc(Procedure.java:161) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:818) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:804) =A0 =A0 =A0 =A0 at tcl.lang.Parser.eval2(Parser.java:1221) =A0 =A0 =A0 =A0 at tcl.lang.Procedure.cmdProc(Procedure.java:161) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:818) =A0 =A0 =A0 =A0 at tcl.lang.Parser.eval2(Parser.java:1221) =A0 =A0 =A0 =A0 at tcl.lang.Interp.eval(Interp.java:2222) =A0 =A0 =A0 =A0 at tcl.lang.Interp.eval(Interp.java:2306) =A0 =A0 =A0 =A0 at=20 tcl.lang.SocketConnectionEvent.processEvent(SocketConnectionEvent.java:31) =A0 =A0 =A0 =A0 at tcl.lang.Notifier.serviceEvent(Notifier.java:444) =A0 =A0 =A0 =A0 at tcl.lang.Notifier.doOneEvent(Notifier.java:585) =A0 =A0 =A0 =A0 at tcl.lang.VwaitCmd.cmdProc(VwaitCmd.java:59) =A0 =A0 =A0 =A0 at tcl.lang.AutoloadStub.cmdProc(Extension.java:144) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:818) =A0 =A0 =A0 =A0 at tcl.lang.Parser.eval2(Parser.java:1221) =A0 =A0 =A0 =A0 at tcl.lang.Interp.eval(Interp.java:2222) =A0 =A0 =A0 =A0 at tcl.lang.Interp.evalFile(Interp.java:2401) =A0 =A0 =A0 =A0 at tcl.lang.SourceCmd.cmdProc(SourceCmd.java:75) =A0 =A0 =A0 =A0 at tcl.lang.Parser.evalObjv(Parser.java:818) =A0 =A0 =A0 =A0 at tcl.lang.Parser.eval2(Parser.java:1221) =A0 =A0 =A0 =A0 at tcl.lang.Interp.eval(Interp.java:2222) =A0 =A0 =A0 =A0 at tcl.lang.Interp.eval(Interp.java:2306) =A0 =A0 =A0 =A0 at tcl.lang.Interp.recordAndEval(Interp.java:2361) =A0 =A0 =A0 =A0 at tcl.lang.ConsoleThread$1.processEvent(Shell.java:321) =A0 =A0 =A0 =A0 at tcl.lang.Notifier.serviceEvent(Notifier.java:444) =A0 =A0 =A0 =A0 at tcl.lang.Notifier.doOneEvent(Notifier.java:585) =A0 =A0 =A0 =A0 at tcl.lang.Shell.main(Shell.java:151) Thanks and bye Marc Ziegenhagen =2D-=20 Marc Ziegenhagen Panorgan AG Pfannenstilstrasse 3 Postfach 470 CH-8820 W=E4denswil Tel. +41 44 783 96 61 =46ax. +41 44 783 96 69 Email mz...@pa... Web http://www.panorgan.ch=09 |
From: Mo D. <md...@un...> - 2006-03-23 22:51:46
|
On Thu, 23 Mar 2006 16:47:47 +0100 Marc Ziegenhagen <mz...@pa...> wrote: > Hallo > > Are the commands socket and fileevent now full work in the > newest release? No. Async sockets and fileevents are not implemented in Jacl because they are not implemented in Java. It would be possible to get them implemented in a future release of Jacl, but that would require JDK 1.4 or newer in order to get access to the new nio package. What do folks think about this? Should Jacl 1.4.0 require JDK 1.4 or newer to run? Is anyone still using JDK versions earlier than this? Mo DeJong |
From: Tom P. <tpo...@ny...> - 2006-03-23 23:36:51
|
On Thu, Mar 23, 2006 at 02:57:33PM -0800, Mo DeJong wrote: > > What do folks think about this? Should Jacl 1.4.0 require JDK 1.4 or > newer to run? Is anyone still using JDK versions earlier than this? I'll vote for Java 1.4. I'd love to see fileevents, newer regexps, and other recent Tcl 8.4/8.5 features. -- Tom Poindexter tpo...@ny... |
From: Maurice D. <Mau...@en...> - 2006-03-24 07:44:27
|
Le 24 mars 06 =E0 00:36, Tom Poindexter a =E9crit : > On Thu, Mar 23, 2006 at 02:57:33PM -0800, Mo DeJong wrote: > >> >> What do folks think about this? Should Jacl 1.4.0 require JDK 1.4 or >> newer to run? Is anyone still using JDK versions earlier than this? > > I'll vote for Java 1.4. > > I'd love to see fileevents, newer regexps, and other recent > Tcl 8.4/8.5 features. I agree too, current jacl is stable enough to be freezed, and you could provide some jacl-2.0 with some compatibility break (if you need it) (adding swank or other library as oddon ?) Maurice P.S. I'm not currently using jacl in critical project, so my opinion should not be very important in your decision... --= |
From: Bruce J. <nm...@ma...> - 2006-03-23 23:47:34
|
Yes, I completely support moving to JDK 1.4. Bruce On Mar 23, 2006, at 5:57 PM, Mo DeJong wrote: > On Thu, 23 Mar 2006 16:47:47 +0100 > Marc Ziegenhagen <mz...@pa...> wrote: > >> Hallo >> >> Are the commands socket and fileevent now full work in the >> newest release? > > No. Async sockets and fileevents are not implemented in Jacl because > they are not implemented in Java. It would be possible to get them > implemented in a future release of Jacl, but that would require JDK > 1.4 > or newer in order to get access to the new nio package. > > What do folks think about this? Should Jacl 1.4.0 require JDK 1.4 or > newer to run? Is anyone still using JDK versions earlier than this? > > Mo DeJong > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Marc Z. <mz...@pa...> - 2006-03-28 17:27:12
|
Hello OK, then I must wait until Jacl is ported to JDK 1.4. Can you say me in witch time this would be done, half year or a year? Marc Ziegenhagen Am Donnerstag, 23. M=E4rz 2006 23:57 schrieb Mo DeJong: > On Thu, 23 Mar 2006 16:47:47 +0100 > > Marc Ziegenhagen <mz...@pa...> wrote: > > Hallo > > > > Are the commands socket and fileevent now full work in the > > newest release? > > No. Async sockets and fileevents are not implemented in Jacl because > they are not implemented in Java. It would be possible to get them > implemented in a future release of Jacl, but that would require JDK 1.4 > or newer in order to get access to the new nio package. > > What do folks think about this? Should Jacl 1.4.0 require JDK 1.4 or > newer to run? Is anyone still using JDK versions earlier than this? > > Mo DeJong > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user =2D-=20 Marc Ziegenhagen Panorgan AG Pfannenstilstrasse 3 Postfach 470 CH-8820 W=E4denswil Tel. +41 44 783 96 61 =46ax. +41 44 783 96 69 Email mz...@pa... Web http://www.panorgan.ch |
From: Rob R. <rr...@fu...> - 2006-04-13 21:40:50
|
Mo, I'd even be more aggressive and go straight to using JDK 1.5. There many benefits to using 1.5 over 1.4 now that it might be worth considering the move now. It seems with the 1.6 release coming out around the corner that 1.4 is pretty dated now. But, yes I'd say that 1.4 should be the oldest JDK supported (if there is a great demand for that.) JMHO, Rob > -----Original Message----- > From: tcl...@li... > [mailto:tcl...@li...]On Behalf Of Mo DeJong > Sent: Thursday, March 23, 2006 4:58 PM > To: tcl...@li... > Subject: Re: [tcljava-user] fileevent and sockets in jacl > > > On Thu, 23 Mar 2006 16:47:47 +0100 > Marc Ziegenhagen <mz...@pa...> wrote: > > > Hallo > > > > Are the commands socket and fileevent now full work in the > > newest release? > > No. Async sockets and fileevents are not implemented in Jacl because > they are not implemented in Java. It would be possible to get them > implemented in a future release of Jacl, but that would require JDK 1.4 > or newer in order to get access to the new nio package. > > What do folks think about this? Should Jacl 1.4.0 require JDK 1.4 or > newer to run? Is anyone still using JDK versions earlier than this? > \> |