Access to the Socket handle?


#1

Can i get the handle insider a `StreamingSocket’ ??

// access to the socket handle int getHandle() const { return handle; }

?


#2

Ok… as long as you promise to use it for good, not evil.


#3

agreed :slight_smile:

For information, i need it to pass to openSSL,

[code]SSLH* SSLClient::connect(StreamingSocket& ss)
{
_certVerified = false;

SSL* s = SSL_new(_SSL_CTX);
if (s)
{
    SSL_set_fd(s, ss.getHandle());    // get the socket handle from Juce
    SSL_set_mode(s, SSL_MODE_AUTO_RETRY);
    
    int r = SSL_connect(s);
    ....

}[/code]

thanks again!


#4

Cool. I added it earlier today.