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.



200
201
202
203
# File 'lib/puma/minissl.rb', line 200

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

Instance Method Details

#acceptObject



209
210
211
212
213
214
215
# File 'lib/puma/minissl.rb', line 209

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

  Socket.new io, engine
end

#accept_nonblockObject



217
218
219
220
221
222
223
# File 'lib/puma/minissl.rb', line 217

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

  Socket.new io, engine
end

#closeObject



225
226
227
# File 'lib/puma/minissl.rb', line 225

def close
  @socket.close
end

#to_ioObject



205
206
207
# File 'lib/puma/minissl.rb', line 205

def to_io
  @socket
end