Posted to tcl by GPS at Tue Aug 14 23:53:02 GMT 2007view raw

  1. george@george-desktop:~$ tclsh8.5
  2. % set s [socket localhost 5555]
  3. sock3
  4. % puts -nonewline $s "abcdefg"
  5. % flush $s
  6. %
  7.  
  8.  
  9. In another terminal:
  10. george@george-desktop:~$ tclsh8.5
  11. % proc accept args {puts $args}
  12. % socket -server accept 5555
  13. sock3
  14. % update
  15. sock4 127.0.0.1 46667
  16. % fconfigure sock4 -blocking 1
  17. % read sock4 3
  18. abc
  19. % fblocked sock4
  20. 0
  21. % info patchlevel
  22. 8.5a6