socket open


==========================
{set server [socket -server [code $this acceptSocketConnection] -myaddr 127.0.0.1 0]} socketerrormsg ]}

        acceptSocketConnection
         fileevent $socket readable [code $this processMessage]
 processMessage
         [catch {gets $socket l_message} l_result]
         set test_segment [string range $l_message 0 4]
                $test_segment == "<done"
==========================

==========================
set ::stru_pipe [open "|\"$::stru_executable\" SUMMARY $l_sumfile SPOTOD $l_spotodfile COORDS $l_coordsfile MOSFLMSOCKET $port"]
fileevent $::stru_pipe readable "[.bb.c component history] monitor"
==========================

 

sendCommand
  puts $socket  $a_command
sendCommand
  puts $socket  $a_command

 

 

After finish send Command
HistoryViewer::monitor
if {[eof $::stru_pipe] || [catch {gets $::stru_pipe line}]} {

 

 

 

 

 

posted @ 2011-09-02 16:37  greencolor  阅读(895)  评论(0编辑  收藏  举报