Class: Puma::MiniSSL::Server
- Inherits:
-
Object
- Object
- Puma::MiniSSL::Server
- Defined in:
- lib/puma/minissl.rb
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.
191 192 193 194 |
# File 'lib/puma/minissl.rb', line 191 def initialize(socket, ctx) @socket = socket @ctx = ctx end |
Instance Method Details
#accept ⇒ Object
200 201 202 203 204 205 206 |
# File 'lib/puma/minissl.rb', line 200 def accept @ctx.check io = @socket.accept engine = Engine.server @ctx Socket.new io, engine end |
#accept_nonblock ⇒ Object
208 209 210 211 212 213 214 |
# File 'lib/puma/minissl.rb', line 208 def accept_nonblock @ctx.check io = @socket.accept_nonblock engine = Engine.server @ctx Socket.new io, engine end |
#close ⇒ Object
216 217 218 |
# File 'lib/puma/minissl.rb', line 216 def close @socket.close end |
#to_io ⇒ Object
196 197 198 |
# File 'lib/puma/minissl.rb', line 196 def to_io @socket end |