[Libwebsockets] Denying a Connection

Andy Green andy at warmcat.com
Sat Apr 14 14:34:00 CEST 2018

On 04/14/2018 07:54 PM, Mooki Moo wrote:
> 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.

It's not that complicated... your problem is your problem.

If lws should do something to improve, well, send patches.

Otherwise, you are in the really strange position of having a problem 
and asking someone you never met to run around taking care of it for you.

If this works both ways and you are available to cut my lawn or rub my 
back, please let me know.


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