Sha256: 5ba4ecf9491b44e459d1f3ba54ee22124157d9554765375f436572a9b842f62b

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

require 'openssl'
module LightIO::Library
  module OpenSSL
    module SSL
      class SSLSocket
        include Base
        include LightIO::Wrap::IOWrapper

        mock ::OpenSSL::SSL::SSLSocket
        prepend LightIO::Library::IO::IOMethods

        wrap_blocking_methods :connect, :accept

        def initialize(io, *args)
          io = io.send(:light_io_raw_obj) if io.is_a?(LightIO::Library::IO)
          super(io, *args)
        end

        def accept_nonblock
          socket = @obj.accept_nonblock(*args)
          socket.is_a?(Symbol) ? socket : self.class._wrap(socket)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lightio-0.4.0 lib/lightio/library/openssl.rb