Home » U++ Library support » U++ Core » How to close the websocket connection
Re: How to close the websocket connection [message #49560 is a reply to message #49555] |
Thu, 01 March 2018 16:55 |
uppjj
Messages: 9 Registered: February 2018 Location: France
|
Promising Member |
|
|
hello all
Mirek,
-in SenRaw you also have to add "mask" line 459 :
else header.Cat((int)len); => else header.Cat((int)len | mask);
-your improvement ... no longer allows me to use "connect". Let me explain :
the server reject : "Get ws://serveur.example.com/chat/sensor-123 HTTP/1.1" // the complete adress
but accept : "Get /chat/sensor-123 HTTP/1.1" // sub adress
if followed by : "Host: server.example.com" // site adress
it is therefore essential to have acces to uri, which in some cases may be different from url.
For the Vector, I am not sure a "Standard header" exist. User should have to delete unwanted items, which is a more complex job than to build all the Header. May be a vectormap with some predefined key "Get", "Host", "Upgrade",Sec-WebSocket-Key" etc.. would facilate the use with "/r/n" taking in account of course.
A good idea should be to add the Websocket Protocol specification RF6455 example in the upp Websocket documentation, to help the user build his own header:
The handshake from the client looks as follows:
GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Origin: http://example.com
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13
JJ
|
|
|
|
|
How to close the websocket connection
By: Tess on Tue, 07 November 2017 11:37
|
|
|
Re: How to close the websocket connection
|
|
|
Re: How to close the websocket connection
By: mirek on Wed, 15 November 2017 08:57
|
|
|
Re: How to close the websocket connection
|
|
|
Re: How to close the websocket connection
By: uppjj on Wed, 14 February 2018 19:17
|
|
|
Re: How to close the websocket connection
By: mirek on Sat, 17 February 2018 12:01
|
|
|
Re: How to close the websocket connection
By: uppjj on Sat, 24 February 2018 15:59
|
|
|
Re: How to close the websocket connection
By: mirek on Sat, 24 February 2018 17:07
|
|
|
Re: How to close the websocket connection
By: uppjj on Wed, 28 February 2018 15:24
|
|
|
Re: How to close the websocket connection
By: mirek on Wed, 28 February 2018 16:25
|
|
|
Re: How to close the websocket connection
By: Klugier on Wed, 28 February 2018 23:27
|
|
|
Re: How to close the websocket connection
By: uppjj on Thu, 01 March 2018 16:55
|
|
|
Re: How to close the websocket connection
By: mirek on Fri, 02 March 2018 15:28
|
|
|
Re: How to close the websocket connection
By: uppjj on Sat, 03 March 2018 00:18
|
|
|
Re: How to close the websocket connection
By: mirek on Sat, 03 March 2018 10:19
|
|
|
Re: How to close the websocket connection
By: uppjj on Sun, 04 March 2018 15:51
|
Goto Forum:
Current Time: Mon May 06 23:42:26 CEST 2024
Total time taken to generate the page: 0.02523 seconds
|