U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » How to close the websocket connection
Re: How to close the websocket connection [message #49459 is a reply to message #48944] Wed, 14 February 2018 19:17 Go to previous messageGo to previous message
uppjj is currently offline  uppjj
Messages: 9
Registered: February 2018
Location: France
Promising Member
Hello
I got the same problem, "Close" put my websocket client in infinite loop.
Server receives the "Close" message from the client but does not actually send the response, because it is in non-blocking mode.
I just do this change in uppsrc/core/WebSocket.cpp , function "out":

// while(IsBlocking()  && socket->IsOpen() && !IsError() && out_queue.GetCount())
   while((IsBlocking() || (s[0] == CLOSE))  && socket->IsOpen() && !IsError() && out_queue.GetCount())


and got "Close" working well...

[Updated on: Wed, 14 February 2018 21:10] by Moderator

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Vector<Vector<double>>
Next Topic: how to convert unicode to String
Goto Forum:
  


Current Time: Sun Apr 26 22:01:18 GMT+2 2026

Total time taken to generate the page: 0.00613 seconds