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.
255 256 257 258 |
# File 'lib/puma/minissl.rb', line 255 def initialize(socket, ctx) @socket = socket @ctx = ctx end |
Instance Method Details
#accept ⇒ Object
264 265 266 267 268 269 270 |
# File 'lib/puma/minissl.rb', line 264 def accept @ctx.check io = @socket.accept engine = Engine.server @ctx Socket.new io, engine end |
#accept_nonblock ⇒ Object
272 273 274 275 276 277 278 |
# File 'lib/puma/minissl.rb', line 272 def accept_nonblock @ctx.check io = @socket.accept_nonblock engine = Engine.server @ctx Socket.new io, engine end |
#close ⇒ Object
280 281 282 |
# File 'lib/puma/minissl.rb', line 280 def close @socket.close unless @socket.closed? # closed? call is for Windows end |
#to_io ⇒ Object
260 261 262 |
# File 'lib/puma/minissl.rb', line 260 def to_io @socket end |