[ruby-core:74069] Re: [Ruby trunk Bug#12126] [PATCH] openssl: accept moving write buffer for write_nonblock

From: Eric Wong <normalperson@...>
Date: 2016-03-01 01:37:02 UTC
List: ruby-core #74069
normalperson@yhbt.net wrote:
> Before this, a Rubyist would need to remember the exact object
> which failed to write and reuse it later when the socket became
> writable again.  This causes problems when the buffer is given
> by another layer of the application (e.g. a buffer is given
> by a Rack middleware or application to a Rack web server).

I should note the content of the buffer still needs to remain the
unchanged.  And IMHO, any reasonable non-blocking server working with
stream sockets is expected to maintain identical content when
retrying writes.

The main difference with this patch is the memory addresses passed
to SSL_write() C function can be safely changed when retrying.
IMHO it's unreasonable for a Ruby programmer to care about memory
addresses passed to C functions when writing in Ruby.

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next