Posted to tcl by aspect at Tue May 30 11:42:03 GMT 2017view raw
- set httpdFile ~/Tcl/Env/src/tcl/tests/httpd
- package require Thread
- package require http
- set httpthread [thread::create -preserved]
- thread::send $httpthread [list source $httpdFile]
- thread::send $httpthread {httpd_init 0; set port} port
- set url http://localhost:$port/
- set before [chan names]
- set token [http::geturl $url -headers {X-Connection keep-alive}]
- parray $token
- http::cleanup $token
- update
- set after [chan names]
- puts "before = $before"
- puts "after = $after"