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.
325 326 327 328 329 |
# File 'lib/puma/minissl.rb', line 325 def initialize(socket, ctx) @socket = socket @ctx = ctx @eng_ctx = IS_JRUBY ? @ctx : SSLContext.new(ctx) end |
Instance Attribute Details
#addr ⇒ Object (readonly)
352 353 354 |
# File 'lib/puma/minissl.rb', line 352 def addr @socket.addr end |
#to_io ⇒ Object (readonly)
346 347 348 |
# File 'lib/puma/minissl.rb', line 346 def to_io @socket end |
Instance Method Details
#accept ⇒ Object
331 332 333 334 335 336 |
# File 'lib/puma/minissl.rb', line 331 def accept @ctx.check io = @socket.accept engine = Engine.server @eng_ctx Socket.new io, engine end |
#accept_nonblock ⇒ Object
338 339 340 341 342 343 |
# File 'lib/puma/minissl.rb', line 338 def accept_nonblock @ctx.check io = @socket.accept_nonblock engine = Engine.server @eng_ctx Socket.new io, engine end |
#close ⇒ Object
356 357 358 |
# File 'lib/puma/minissl.rb', line 356 def close @socket.close unless @socket.closed? # closed? call is for Windows end |
#closed? ⇒ Boolean
360 361 362 |
# File 'lib/puma/minissl.rb', line 360 def closed? @socket.closed? end |