Open
Description
I would like to propose that we rename SSLSocket#accept
and SSLSocket#accept_nonblock
to SSLSocket#start
and SSLSocket#start_nonblock
.
There are two reasons:
- It aligns better with
SSLServer#start_immediately
. In other words,start_immediately
-> callSSLSocket#start
immediately on accept. - It avoids confusion with
Socket#accept
(and indirectlySSLServer#accept
) which serve an entirely different purpose.
I tried to write generic socket handling code like this:
server.accept do |socket|
if socket.respond_to?(:accept)
socket.accept
end
yield socket
end
However this code failed because Socket
implements #accept
- I did not think the design through fully. But, I think overloading SSLSocket#accept
in this way is basically confusing.
Of course, we should keep aliases for backwards compatibility.
@rhenium wdyt?
Metadata
Metadata
Assignees
Labels
No labels