lib/celluloid/io/ssl_socket.rb in celluloid-io-0.17.1 vs lib/celluloid/io/ssl_socket.rb in celluloid-io-0.17.2
- old
+ new
@@ -1,27 +1,27 @@
-require 'openssl'
+require "openssl"
module Celluloid
module IO
# SSLSocket with Celluloid::IO support
class SSLSocket < Stream
extend Forwardable
def_delegators :@socket,
- :read_nonblock,
- :write_nonblock,
- :close,
- :closed?,
- :cert,
- :cipher,
- :client_ca,
- :peeraddr,
- :peer_cert,
- :peer_cert_chain,
- :post_connection_check,
- :verify_result,
- :sync_close=
+ :read_nonblock,
+ :write_nonblock,
+ :close,
+ :closed?,
+ :cert,
+ :cipher,
+ :client_ca,
+ :peeraddr,
+ :peer_cert,
+ :peer_cert_chain,
+ :post_connection_check,
+ :verify_result,
+ :sync_close=
def initialize(io, ctx = OpenSSL::SSL::SSLContext.new)
super()
@context = ctx
@socket = OpenSSL::SSL::SSLSocket.new(::IO.try_convert(io), @context)
@@ -45,9 +45,11 @@
rescue ::IO::WaitWritable
wait_writable
retry
end
- def to_io; @socket; end
+ def to_io
+ @socket
+ end
end
end
end