Posted to tcl by GPS at Tue Aug 14 23:53:02 GMT 2007view raw
- george@george-desktop:~$ tclsh8.5
- % set s [socket localhost 5555]
- sock3
- % puts -nonewline $s "abcdefg"
- % flush $s
- %
- In another terminal:
- george@george-desktop:~$ tclsh8.5
- % proc accept args {puts $args}
- % socket -server accept 5555
- sock3
- % update
- sock4 127.0.0.1 46667
- % fconfigure sock4 -blocking 1
- % read sock4 3
- abc
- % fblocked sock4
- 0
- % info patchlevel
- 8.5a6