Well the SSL calls are not exactly synchronous. They return when they can
not fulfil a request

and using the return code we can find out whether it want to read the data
or write data.

This behaviour depends on type of Underlying BIO. So for BIO pair or memory
BIO they don't block.



 On Feb 22, 2015 2:04 AM, "Ben Noordhuis" <[email protected]> wrote:

> On Thu, Feb 19, 2015 at 5:30 PM, Devchandra Meetei <[email protected]>
> wrote:
> > Hi All
> > Wondering what will be best way to get callback when something outside of
> > what libuv monitors OR
> > is there a way to add custom events to libuv and get notified when the
> > happens via a registered callback
> >
> > What I am trying to do is something like
> >
> > When a TCP client connects and we start reading. The client send some
> data
> > which need further processing like SSL handshake.
> > We fed the data to OpenSSL by writing to BIO. Now SSL state machine give
> me
> > back the data, which I need to send back. The
> > SSL informs this by way of SSL_ERROR_WANT_WRITE/READ, At this time we
> can do
> > a BIO_read and do a uv_write.
> >
> > We do this manually now by checking BIO_pending. We have have a way of
> being
> > notified when such condition happens.
> > So, w
> > It will ease up life a bit for me.
> > Please guide me through if my approach or thinking is not optimal.
>
> I'm not sure I understand your question.  SSL_read() and SSL_write()
> are synchronous, where/when would you want to insert a callback?
>
> --
> You received this message because you are subscribed to the Google Groups
> "libuv" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/libuv.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to