[Info-vax] OpenSSL read/write timeouts
Rich Jordan
jordan at ccs4vms.com
Thu Jan 15 13:18:24 EST 2009
On Jan 14, 11:32 pm, Victor <victor.e... at gmail.com> wrote:
> Rich Jordan:
>
> > Hoping someone here has done this, but if not I'll pester the OpenSSL
> > lists; so far google searches are not turning up useful results
> > (though perhaps the lack of same is an answer in itself).
>
> > Is there a way to put a timeout on a blocking read/write in OpenSSL?
> > The only timeout documentation I can find is for an SSL session
> > timeout (default 300 seconds), but nothing for a timeout on an actual
> > I/O operation using SSL_READ() or SSL_WRITE().
>
> > Do you have to handle it at the lower socket layer? Or roll your own
> > with polling and traps using non-blocking read/write functions (read
> > timeouts are the critical one for this app, but both would be nice).
>
> Yes, we do it through the non-blocking calls. It happened to be a
> small enough solution to stop looking for anything else. See the
> example below, but don't take it too seriously as it was
> just a fast and dirty (but working) proof of the concept for our
> Windows-types.
>
Victor,
thanks for that example. I'm looking to see how to adapt to to
the code we've already built; since that was modeled after the
examples too hopefully it won't be too difficult.
Of course all of this is just highlighting how rusty I am at 'C'
and nets and bolts programming these days.
Rich
More information about the Info-vax
mailing list