三九宝宝网宝宝教育教学论文

tcl脚本语言编写的socket客户端

01月06日 编辑 39baobao.com

下面是client.tclproc Socket_Client {host port timeout} { global connected after $timeout {set connected timeout} set sock [socket -async $host $port] fileevent $sock w {set connected ok} vwait connected fileevent $sock w {} if {$connected == "timeout"} { return -code error timeout } else { return $sock }}Socket_Client "10.33.132.2" 2540 100...

推荐阅读
图文推荐