Posted to tcl by kostix at Wed May 07 00:24:55 GMT 2008view raw

  1. package require ceptcl
  2.  
  3. set s [cep -domain local /tmp/dbus_test]
  4. fconfigure $s -translation binary -buffering none -blocking no
  5. proc foo chan {
  6. set n [gets $chan]
  7. if {$n < 0} {
  8. close $chan
  9. puts "unexpected remote disconnect"
  10. }
  11. }
  12. fileevent $s readable [list foo $s]
  13. puts $s hey!
  14.  
  15. vwait forever
  16.