1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Add proper methods for nonblocking

This commit is contained in:
Evan Phoenix 2012-09-10 08:50:43 -07:00
parent faf7f9916c
commit 9114e3c9d2

View file

@ -52,7 +52,7 @@ module Puma::MiniSSL
enc = @engine.extract
if enc
@socket.write enc
@socket.syswrite enc
end
need -= wrote
@ -63,6 +63,8 @@ module Puma::MiniSSL
end
end
alias_method :syswrite, :write
def flush
@socket.flush
end
@ -108,6 +110,13 @@ module Puma::MiniSSL
Socket.new io, engine
end
def accept_nonblock
io = @socket.accept_nonblock
engine = Engine.server @ctx.key, @ctx.cert
Socket.new io, engine
end
def close
@socket.close
end