diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-17 08:22:45 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-17 08:22:45 +0000 |
commit | 39c4886fe761cf4cc4f4f137cf3602c9ee616184 (patch) | |
tree | edadc927e0f71fa96d55a26318d9a11be1298803 /ext/openssl/lib/openssl/buffering.rb | |
parent | 7544cb39302fc5964849d43b80472c2071f28261 (diff) |
* ext/openssl/lib/openssl/ssl.rb (SSLSocket#sync_close=): add a
method to specify if the underlying IO will be closed in
SSLSocket#close.
* ext/openssl/lib/openssl/buffering.rb: add forwarders to
setsockopt, getsockopt and fcntl.
* ext/openssl/lib/net/protocols.rb: enable sync for SSLSocket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib/openssl/buffering.rb')
-rw-r--r-- | ext/openssl/lib/openssl/buffering.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb index f07e5bc4c1..6ddec099bf 100644 --- a/ext/openssl/lib/openssl/buffering.rb +++ b/ext/openssl/lib/openssl/buffering.rb @@ -16,7 +16,7 @@ module Buffering include Enumerable - attr_accessor :sync + attr_accessor :sync, :sync_close BLOCK_SIZE = 1024*16 # @@ -185,5 +185,7 @@ module Buffering def close flush sysclose + @sync_close ||= false + @io.close if @sync_close end end |