Thanks a lot, Marten - it works like a charm :-) All the best
Alex -- http://www.carot.de Email : alexan...@carot.de Tel.: +49 (0)177 5719797 > Gesendet: Montag, 11. Mai 2020 um 11:16 Uhr > Von: "Mårten Nordheim" <marten.nordh...@qt.io> > An: "qt qt" <interest@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-boun...@qt-project.org> on behalf of "Alexander > Carôt" <alexander_ca...@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 : alexan...@carot.de > Tel.: +49 (0)177 5719797 > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest > _______________________________________________ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest > _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest