> So what would be your recommendation?
> Partial writes or not ?
Sane non-blocking implementations pretty much have to enable 'partial
writes' and 'enable moving write buffer'. Otherwise the semantics become
insane, as you pointed out.
> It all seems a bit unclear to me still I'm afraid. mostly
On Saturday 31 March 2007 13:30, David Schwartz wrote:
> > It's just this I'm having a hard trouble to grasp.
> > Normally with say 'write' I would do
> >
> > // pseudo code
> > while(written < len)
> >written += write(fd, my_packet + written, len - written);
> >
> > But because SSL_write handl
> It's just this I'm having a hard trouble to grasp.
> Normally with say 'write' I would do
>
> // pseudo code
> while(written < len)
>written += write(fd, my_packet + written, len - written);
>
> But because SSL_write handles an internal queue and calls for
> sending the same
> argument all t
On Saturday 31 March 2007 00:26, David Schwartz wrote:
> > I see, so if I disable PARTIAL_WRITES, will that mean that it will return
> > values as I wrote up there?
>
> PARTIAL_WRITES has no effect on the meaning of the return value. It just
> controls whether or not the internal write logic tries
> I see, so if I disable PARTIAL_WRITES, will that mean that it will return
> values as I wrote up there?
PARTIAL_WRITES has no effect on the meaning of the return value. It just
controls whether or not the internal write logic tries to continue writing
if the underlying write partially completes
On Friday 30 March 2007 22:41, David Schwartz wrote:
> > > Call SSL_write with the same parameters until it succeeds. You need
> > > to handle WANT_READ and WANT_WRITE return values.
> >
> > I guess that is clear enough.
> > but does that imply if I call
> > SSL_write(ssl, buffer, len),
> > it wil
> > Call SSL_write with the same parameters until it succeeds. You need
> > to handle WANT_READ and WANT_WRITE return values.
> I guess that is clear enough.
> but does that imply if I call
> SSL_write(ssl, buffer, len),
> it will ONLY return len
> or <0 ?
> I mean if it returns len/2 (sent on
>Hi,
>
> > I've been trying to figure out (plus testing) how to actually
> > use SSL_write.
>
> Call SSL_write with the same parameters until it succeeds. You need
> to handle WANT_READ and WANT_WRITE return values.
I guess that is clear enough.
but does that imply if I call
SSL_write(ssl, buffe
Hi,
> I've been trying to figure out (plus testing) how to actually
> use SSL_write.
Call SSL_write with the same parameters until it succeeds. You need
to handle WANT_READ and WANT_WRITE return values.
Mark
__
OpenSSL Projec