Home » U++ Library support » U++ Core » How to close the websocket connection
Re: How to close the websocket connection [message #49555 is a reply to message #49554] |
Wed, 28 February 2018 23:27 |
|
Klugier
Messages: 1076 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello Mirek,
Why not to keep request_headers as Vector:
Vector<String> request_headers;
request_headers = {
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"",
"Accept-Language: cs,en-US;q=0.7,en;q=0.3",
...
};
// The user can add custom headers to the vector with more straight forward wait. Moreover user will not be obligated to remember about /r/n.
auto header = web_socket.StandardHeaders();
header.Add("Custom-header: data");
// Deletation is also trivial of any of the standard headers.
request_headers.Remove(1); // Remove ""Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"",", I don't need it!
// The set method also needs to be change
web_socket.RequestHeaders(request_headers);
\r\n can be added to the lines while processing. These approch is more flexible than String implementatino. Please let me know what do you think?
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Wed, 28 February 2018 23:40] Report message to a moderator
|
|
|
|
|
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: Tue May 07 05:35:12 CEST 2024
Total time taken to generate the page: 0.02194 seconds
|