摘要: Server:set socket ""proc acceptSocketConnection { a_sock an_addr a_port } { global socket set socket $a_sock fconfigure $socket -buffering line -translation lf -blocking 0 -buffersize 72000 fileevent $socket readable processMessage set ready 1 set datestamp 20110901if { ![regexp -nocase wi 阅读全文
posted @ 2011-09-02 23:12 greencolor 阅读(192) 评论(0) 推荐(0) 编辑
摘要: =========================={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_me 阅读全文
posted @ 2011-09-02 16:37 greencolor 阅读(895) 评论(0) 推荐(0) 编辑