[Libwebsockets] Denying a Connection

Mooki Moo mookimoo73 at gmail.com
Sat Apr 14 13:54:48 CEST 2018

Sorry Andy, but I'm confused by your comment, can you explain please.

I presented what I thought were sensible options as a possible
solutions to my issue, in the hope that someone might have expressed
an opinion of their viability to solve it.


On 14 April 2018 at 11:40, Andy Green <andy at warmcat.com> wrote:
> On 04/14/2018 06:39 PM, Mooki Moo wrote:
>> That was quick, thank you.
>> I appreciate and unserstand the pupae / butterfly analogy,  but due to
>> the fact that I know I can expect multiple clients from the same IP
>> (NAT) from my understanding of the documentation the
>> LWS_WITH_PEER_LIMITS approach will not work for me. So I need a
>> solution that will allow multiple connections from the same IP but
>> only allow one from a distinct user.
>> As I see it I have a couple of options; the first is to drop the
>> existing connection, and allow the new one to proceed. Or mark the
>> request to be dropped then drop it via the LWS_CALLBACK_ESTABLISHED
>> reason.
>> Either way I should be able to inform the user via the
>> lws_close_reason as I already have a connection for scenario A I can
>> provide a reason as to why the connection was dropped, and the same
>> for scenario B as the connection will have metamorphosed in to a wss
>> connection at the LWS_CALLBACK_ESTABLISHED point.
>> Does this make sense?
> Everything makes sense except why any of what "you need a solution for" is
> my problem.
> -Andy

More information about the Libwebsockets mailing list