On 01/16/2015 09:29 AM, Devchandra Meetei wrote:
> Thank you Ben,
> That explains a lot.
> I was trying to have a way for SSL support and I don't want to go BIO
> pair way as it involves few other nitty gritty house keeping.
> 

I did a prototype implementation using pyuv and it wasn't that bad,
also, you'd get to use the "standard" uv_stream_t functions.

> With the clue you suggested, image is getting more and more clear.
> What I am thinking now is,
> 1) setup a non blocking socket and uv_tcp_open and uv_poll_init.
> 

That's not going to work. Even if you create the fd externally and then
pass it to uv_tcp_open, libuv will internally create one single uv__io_t
for it, and we only support one of those per fd. Bad things will happen
after you do uv_poll_init, because a new uv__io_t will be created for
the *same* fd.

> 2) Poll calback will accept the connection and used the accepted fd in SSL
> 
> is this plausible or you have better approaches in mind?
> 

I don't have a ton on experience with it, but I'd go with the BIO
approach + wrap some of the libuv functions to do the SSL maneuvering
before calling user callbacks.


Those are my 2 cents.

-- 
Saúl Ibarra Corretgé
bettercallsaghul.com


-- 
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.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to