I realised that my problem with wrapping sockets in ssl, when the socket is built from a fd is related to a socket._socketobject being converted (after rebuilding it from fd) into a socket._socket.
Is there any way to turn the socket._socket back into a _socketobject?
Thanks
LJNielsenDk
1,4601 gold badge16 silver badges32 bronze badges
asked May 24, 2013 at 16:49
unixsnob
1,7153 gold badges21 silver badges47 bronze badges
1 Answer 1
The only solution that actually works was found in a lonely post here: http://www.velocityreviews.com/forums/t557014-socket-vs-_socketobject.html
To get a socket._socketobject from a socket._socket you need to do:
newSockObj = socket.socket(_sock=sock)
Ugly, but it works, as that post said...
answered May 24, 2013 at 17:26
unixsnob
1,7153 gold badges21 silver badges47 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-py