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:
parent
faf7f9916c
commit
9114e3c9d2
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue