Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing query string parameter #92

Closed
EhsanVahab opened this issue Jun 16, 2019 · 2 comments
Closed

Changing query string parameter #92

EhsanVahab opened this issue Jun 16, 2019 · 2 comments

Comments

@EhsanVahab
Copy link

Hi @bsergean

is it possible to change query string parameter after socket connection is established without closing and opening it again?
for example?

ix::WebSocket webSocket;
		webSocket.setOnMessageCallback(
		    [](ix::WebSocketMessageType messageType,
		       const std::string& str,
		       size_t wireSize,
		       const ix::WebSocketErrorInfo& error,
		       const ix::WebSocketOpenInfo& openInfo,
		       const ix::WebSocketCloseInfo& closeInfo)
			   {
		        if (messageType == ix::WebSocketMessageType::Message)
		        {
		            std::cout << str << std::endl;
		        }
			   });
              url="http://mysocketaddress?param=1"
		webSocket.setUrl(url);
                webSocket.start();
		webSocket.send(str)
                url="http://mysocketaddress?param=2"
               webSocket.setUrl(url);
              webSocket.send(str)
@bsergean
Copy link
Collaborator

bsergean commented Jun 16, 2019 via email

@EhsanVahab
Copy link
Author

My idea was completely wrong.
actually only the first attempt to the server uses http handshake and then it saves on a session variable until the socket is alive.
thanks for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants