[Libwebsockets] Fwd: Re: how do I detect if a given connection is SSL if LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT is used?

Andy Green andy at warmcat.com
Sat Aug 16 04:25:58 CEST 2014


(sorry I missed the list off)


-------- Original Message --------
From: Andy Green <andy at warmcat.com>
Sent: 16 August 2014 10:02:06 GMT+08:00
To: Michael Haberler <mail17 at mah.priv.at>
Subject: Re: [Libwebsockets] how do I detect if a given connection is SSL if	LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT is used?



On 16 August 2014 05:23:20 GMT+08:00, Michael Haberler <mail17 at mah.priv.at> wrote:
>
>the way I read it LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT would
>allow both ws: and wss: (and http+https)
>
>if so, I'd need to tell those apart per-connection; how would I test
>for this?

There's no way until now... you're right, adding that option means you can have both kinds of connections and you may want to handle them differently in user code.

I added an accessor function for it from the wsi here -->

http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/commit/?id=b128ccccca1d359637a99b2e5a6b342cfcbd63aa

-Andy

>thanks,
>
>- Michael
>
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://ml.libwebsockets.org/mailman/listinfo/libwebsockets
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20140816/1cf494b0/attachment.html>


More information about the Libwebsockets mailing list