Class: Puma::MiniSSL::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/puma/minissl.rb

Instance Method Summary collapse

Constructor Details

#initialize(socket, ctx) ⇒ Server

Returns a new instance of Server.


278
279
280
281
# File 'lib/puma/minissl.rb', line 278

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

Instance Method Details

#acceptObject


287
288
289
290
291
292
293
# File 'lib/puma/minissl.rb', line 287

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

  Socket.new io, engine
end

#accept_nonblockObject


295
296
297
298
299
300
301
# File 'lib/puma/minissl.rb', line 295

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

  Socket.new io, engine
end

#addrObject


303
304
305
# File 'lib/puma/minissl.rb', line 303

def addr
  @socket.addr
end

#closeObject


307
308
309
# File 'lib/puma/minissl.rb', line 307

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

#to_ioObject


283
284
285
# File 'lib/puma/minissl.rb', line 283

def to_io
  @socket
end