receiving_client.tcl

Go to the documentation of this file.
00001 /* !/bin/sh*/
00002 /*  -*- tcl -*- \*/
00003 exec tclsh "$0"  ${1+"$@"}
00004 
00005 package require comm
00006 package require tie
00007 
00008  id =  [lindex $argv 0]
00009 
00010 ret  import (type remotevar , type localvar) {
00011     global id
00012     comm::comm send $id [list \
00013         tie::tie $remotevar remotearray \
00014         $localvar {comm::comm send} [comm::comm self] \
00015      ]
00016 }
00017 
00018 ret  Track (type args) {
00019     global receiver
00020     puts *\ \[[join $args "\] \["]\]\ ([dictsort [array get receiver]])
00021     return
00022 }
00023 
00024 ret  dictsort (type dict) {
00025     array set a $dict
00026     set out [list]
00027     foreach key [lsort [array names a]] {
00028     lappend out $key $a($key)
00029     }
00030     return $out
00031 }
00032 
00033 array           receiver =  {}
00034 trace add variable receiver {write un} Track = 
00035 
00036 import server receiver
00037 
00038 puts "Waiting on $id"
00039 vwait forever
00040 

Generated on 21 Sep 2010 for Gui by  doxygen 1.6.1