123456789_123456789_123456789_123456789_123456789_

Class: Puma::MiniSSL::Server

Relationships & Source Files
Inherits: Object
Defined in: lib/puma/minissl.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(socket, ctx) ⇒ Server

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 319

def initialize(socket, ctx)
  @socket = socket
  @ctx = ctx
  @eng_ctx = IS_JRUBY ? @ctx : SSLContext.new(ctx)
end

Instance Attribute Details

#addr (readonly)

Version:

  • 5.0.0

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 346

def addr
  @socket.addr
end

#closed?Boolean (readonly)

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 354

def closed?
  @socket.closed?
end

#to_io (readonly)

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 340

def to_io
  @socket
end

Instance Method Details

#accept

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 325

def accept
  @ctx.check
  io = @socket.accept
  engine = Engine.server @eng_ctx
  Socket.new io, engine
end

#accept_nonblock

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 332

def accept_nonblock
  @ctx.check
  io = @socket.accept_nonblock
  engine = Engine.server @eng_ctx
  Socket.new io, engine
end

#close

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 350

def close
  @socket.close unless @socket.closed?       # closed? call is for Windows
end