diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-18 22:49:48 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-18 22:49:48 +0000 |
commit | ba64282cdc2e02a742ae5e0159d606051f188aa5 (patch) | |
tree | f2a04d9bf6592f11b1d81a233991d4b75b0faeaa /ext/openssl/sample/echo_cli.rb | |
parent | 40fc7dba9e429b59089a45020245ec61ea4d8086 (diff) |
* ext/openssl/ossl_ssl.c: sync_close is moved to SSLSocket as
a builtin.
* ext/openssl/lib/openssl/buffering.rb (Buffering#close): ditto.
* ext/openssl/lib/openssl/buffering.rb (Buffering#puts): should
add a return to the tails of each line.
* ext/openssl/lib/openssl/ssl.rb: new class OpenSSL::SSL::SSLServer.
* ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): use sync_close.
* ext/openssl/sample/echo_svr.rb: use SSLServer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/sample/echo_cli.rb')
-rw-r--r-- | ext/openssl/sample/echo_cli.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/openssl/sample/echo_cli.rb b/ext/openssl/sample/echo_cli.rb index 87dacaf545..29b356a7ad 100644 --- a/ext/openssl/sample/echo_cli.rb +++ b/ext/openssl/sample/echo_cli.rb @@ -26,11 +26,12 @@ end s = TCPSocket.new(host, port) ssl = OpenSSL::SSL::SSLSocket.new(s, ctx) -ssl.connect +ssl.connect # start SSL session +ssl.sync_close = true # if true the underlying socket will be + # closed in SSLSocket#close. (default: false) while line = $stdin.gets ssl.write line print ssl.gets end ssl.close -s.close |