PDA

View Full Version : how to properly close and delete a websocket?



cosmos
18th October 2017, 05:09
my app uses websocket, i want to close it and delete the websocket when it is not needed. what should i do?
i looked at the echo examples, only found it doesnt close and delete the socket object, exits to system directly.

thanks in advance.

Santosh Reddy
18th October 2017, 07:11
QWebSocket::~QWebSocket()

Destroys the QWebSocket. Closes the socket if it is still open, and releases any used resources.
Just delete it