Class: Puma::MiniSSL::Server
- Inherits:
-
Object
- Object
- Puma::MiniSSL::Server
- Defined in:
- lib/puma/minissl.rb
Overview
if defined?(JRUBY_VERSION) class Engine def self.server(key, cert) new(key, cert) end end end
Instance Method Summary collapse
- #accept ⇒ Object
- #accept_nonblock ⇒ Object
- #close ⇒ Object
-
#initialize(socket, ctx) ⇒ Server
constructor
A new instance of Server.
- #to_io ⇒ Object
Constructor Details
#initialize(socket, ctx) ⇒ Server
Returns a new instance of Server.
112 113 114 115 |
# File 'lib/puma/minissl.rb', line 112 def initialize(socket, ctx) @socket = socket @ctx = ctx end |
Instance Method Details
#accept ⇒ Object
121 122 123 124 125 126 |
# File 'lib/puma/minissl.rb', line 121 def accept io = @socket.accept engine = Engine.server @ctx.key, @ctx.cert Socket.new io, engine end |
#accept_nonblock ⇒ Object
128 129 130 131 132 133 |
# File 'lib/puma/minissl.rb', line 128 def accept_nonblock io = @socket.accept_nonblock engine = Engine.server @ctx.key, @ctx.cert Socket.new io, engine end |
#close ⇒ Object
135 136 137 |
# File 'lib/puma/minissl.rb', line 135 def close @socket.close end |
#to_io ⇒ Object
117 118 119 |
# File 'lib/puma/minissl.rb', line 117 def to_io @socket end |