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.
248 249 250 251 |
# File 'lib/puma/minissl.rb', line 248 def initialize(socket, ctx) @socket = socket @ctx = ctx end |
Instance Method Details
#accept ⇒ Object
257 258 259 260 261 262 263 |
# 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 ⇒ Object
265 266 267 268 269 270 271 |
# 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 ⇒ Object
273 274 275 |
# File 'lib/puma/minissl.rb', line 273 def close @socket.close unless @socket.closed? # closed? call is for Windows end |
#to_io ⇒ Object
253 254 255 |
# File 'lib/puma/minissl.rb', line 253 def to_io @socket end |