Class: Puma::MiniSSL::Server
- Inherits:
-
Object
- Object
- Puma::MiniSSL::Server
- Defined in:
- lib/puma/minissl.rb
Instance Attribute Summary collapse
- #addr ⇒ Object readonly
- #to_io ⇒ Object readonly
Instance Method Summary collapse
- #accept ⇒ Object
- #accept_nonblock ⇒ Object
- #close ⇒ Object
- #closed? ⇒ Boolean
-
#initialize(socket, ctx) ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize(socket, ctx) ⇒ Server
Returns a new instance of Server.
418 419 420 421 422 |
# File 'lib/puma/minissl.rb', line 418 def initialize(socket, ctx) @socket = socket @ctx = ctx @eng_ctx = IS_JRUBY ? @ctx : SSLContext.new(ctx) end |
Instance Attribute Details
#addr ⇒ Object (readonly)
445 446 447 |
# File 'lib/puma/minissl.rb', line 445 def addr @socket.addr end |
#to_io ⇒ Object (readonly)
439 440 441 |
# File 'lib/puma/minissl.rb', line 439 def to_io @socket end |
Instance Method Details
#accept ⇒ Object
424 425 426 427 428 429 |
# File 'lib/puma/minissl.rb', line 424 def accept @ctx.check io = @socket.accept engine = Engine.server @eng_ctx Socket.new io, engine end |
#accept_nonblock ⇒ Object
431 432 433 434 435 436 |
# File 'lib/puma/minissl.rb', line 431 def accept_nonblock @ctx.check io = @socket.accept_nonblock engine = Engine.server @eng_ctx Socket.new io, engine end |
#close ⇒ Object
449 450 451 |
# File 'lib/puma/minissl.rb', line 449 def close @socket.close unless @socket.closed? # closed? call is for Windows end |
#closed? ⇒ Boolean
453 454 455 |
# File 'lib/puma/minissl.rb', line 453 def closed? @socket.closed? end |