Posted to tcl by jima at Thu Nov 19 13:42:48 GMT 2015view raw
- package require http
- package require -exact tls 1.6
- proc JIMA_TLS {args} {
- puts JIMA_TLS($args)
- }
- proc client {host port} {
- set s [
- ::tls::socket -require 0 -request 0 -ssl3 0 -ssl2 0 -tls1 1 -tls1.1 1 -tls1.2 1 -command JIMA_TLS $host $port
- ]
- fconfigure $s -blocking 0
- return $s
- }
- set s [client localhost 8080]
- puts $s "Hello!"
- gets $s line
- puts $line