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 » Problem with websocket connect method
Re: Problem with websocket connect method [message #49016 is a reply to message #49015] Sun, 26 November 2017 19:03 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Patch applied, with small variation:

void WebSocket::Do0()
{
	int prev_opcode;
	do {
		prev_opcode = opcode;
		if(findarg(opcode, DNS, SSL_HANDSHAKE) < 0) {
			Output();
			if(socket->IsEof() && !(close_sent || close_received))
				Error("Socket has been closed unexpectedly");
		}
		if(IsError())
			return;
		switch(opcode) {


- SSL_HANDSHAKE is the same situation...

Other than that, I need to apologize for "undertesting" Connect - I simply thought that Connect is not really important, as WebSocket is intended to be Browser->Server interface and we are the server...

Quote:

I also have a suggestion: it would be great to check whether connect is successful via special method (e.g. IsConnected()) that returns true after the client has received websocket header from server in "handshake" stage. Roughly like this:


Why do not you just use IsOpen?

Mirek
 
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: Bug with FindMatch(const Range& r, const C& match, int from = 0)
Next Topic: Vector<Vector<double>>
Goto Forum:
  


Current Time: Sat Apr 27 18:37:18 CEST 2024

Total time taken to generate the page: 0.03528 seconds