123456789_123456789_123456789_123456789_123456789_

Class: Puma::MiniSSL::Server

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

Class Method Summary

Instance Method Summary

Constructor Details

.new(socket, ctx) ⇒ Server

[ GitHub ]

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

def initialize(socket, ctx)
  @socket = socket
  @ctx = ctx
end

Instance Method Details

#accept

[ GitHub ]

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

def accept
  @ctx.check
  io = @socket.accept
  engine = Engine.server @ctx

  Socket.new io, engine
end

#accept_nonblock

[ GitHub ]

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

def accept_nonblock
  @ctx.check
  io = @socket.accept_nonblock
  engine = Engine.server @ctx

  Socket.new io, engine
end

#close

[ GitHub ]

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

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

#to_io

[ GitHub ]

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

def to_io
  @socket
end