[Interest] QWebSocket limit connection
Mårten Nordheim
marten.nordheim at qt.io
Mon May 11 11:16:56 CEST 2020
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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: source.cpp
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200511/5434f3db/attachment.ksh>
More information about the Interest
mailing list