Celluloid::IO::SSLSocket

SSLSocket with Celluloid::IO support

Public Class Methods

new(io, ctx = OpenSSL::SSL::SSLContext.new) click to toggle source
# File lib/celluloid/io/ssl_socket.rb, line 12
def initialize(io, ctx = OpenSSL::SSL::SSLContext.new)
  super()
  @context = ctx
  @socket = OpenSSL::SSL::SSLSocket.new(::IO.try_convert(io), @context)
end

Public Instance Methods

accept() click to toggle source
# File lib/celluloid/io/ssl_socket.rb, line 25
def accept
  @socket.accept_nonblock
  self
rescue ::IO::WaitReadable
  wait_readable
  retry
rescue ::IO::WaitWritable
  wait_writable
  retry
end
connect() click to toggle source
# File lib/celluloid/io/ssl_socket.rb, line 18
def connect
  @socket.connect_nonblock
rescue ::IO::WaitReadable
  wait_readable
  retry
end
to_io() click to toggle source
# File lib/celluloid/io/ssl_socket.rb, line 36
def to_io; @socket; end

[Validate]

Generated with the Darkfish Rdoc Generator 2.