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.



191
192
193
194
# File 'lib/puma/minissl.rb', line 191

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

Instance Method Details

#acceptObject



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_nonblockObject



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

#closeObject



216
217
218
# File 'lib/puma/minissl.rb', line 216

def close
  @socket.close
end

#to_ioObject



196
197
198
# File 'lib/puma/minissl.rb', line 196

def to_io
  @socket
end