Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: Mon May 06 19:05:40 CEST 2024

Total time taken to generate the page: 0.03033 seconds