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.



159
160
161
162
# File 'lib/puma/minissl.rb', line 159

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

Instance Method Details

#acceptObject



168
169
170
171
172
173
# File 'lib/puma/minissl.rb', line 168

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

  Socket.new io, engine
end

#accept_nonblockObject



175
176
177
178
179
180
# File 'lib/puma/minissl.rb', line 175

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

  Socket.new io, engine
end

#closeObject



182
183
184
# File 'lib/puma/minissl.rb', line 182

def close
  @socket.close
end

#to_ioObject



164
165
166
# File 'lib/puma/minissl.rb', line 164

def to_io
  @socket
end