[Interest] QWebSocket limit connection

"Alexander Carôt" alexander_carot at gmx.net
Thu May 14 10:24:55 CEST 2020


Thanks a lot, Marten - it works like a charm :-)

All the best

Alex

--
http://www.carot.de
Email : Alexander at Carot.de
Tel.: +49 (0)177 5719797


> Gesendet: Montag, 11. Mai 2020 um 11:16 Uhr
> Von: "Mårten Nordheim" <marten.nordheim at qt.io>
> An: "qt qt" <interest at qt-project.org>
> Betreff: Re: [Interest] QWebSocket limit connection
>
> Hello!
> 
> If you are using a QWebSocketServer you can call close() when a new connection has been established and call listen() again when the currently-connected socket disconnects.
> 
> Attached is a toy example of doing so.
> 
> Mårten
> 
> PS: Apologies for double mail to Alexander, pressed Reply instead of Reply all...
> 
> ________________________________________
> From: Interest <interest-bounces at qt-project.org> on behalf of "Alexander Carôt" <alexander_carot at gmx.net>
> Sent: Monday, May 11, 2020 10:13
> To: qt qt
> Subject: [Interest] QWebSocket limit connection
> 
> Hello all,
> 
> I am using a QWebSocket in order to communicate between a browser and an application which works fine.
> 
> In my specific use case I want to prevent more than one browser to connect to the application.
> 
> Is there a way to decline further connections after one has been established ?
> 
> Thanks in advance,
> best
> 
> Alex
> 
> 
> --
> http://www.carot.de
> Email : Alexander at Carot.de
> Tel.: +49 (0)177 5719797
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
>


More information about the Interest mailing list