mirror of
https://github.com/socketio/socket.io-client-cpp.git
synced 2026-06-09 19:54:46 +00:00
core: allow resource path to be set in connection URI for 2.x (#303)
This commit is contained in:
parent
973eeaa6e3
commit
fb8efd9503
@ -222,7 +222,12 @@ namespace sio
|
||||
} else {
|
||||
ss<<uo.get_host();
|
||||
}
|
||||
ss<<":"<<uo.get_port()<<"/socket.io/?EIO=3&transport=websocket";
|
||||
|
||||
// If a resource path was included in the URI, use that, otherwise
|
||||
// use the default /socket.io/.
|
||||
const std::string path(uo.get_resource() == "/" ? "/socket.io/" : uo.get_resource());
|
||||
|
||||
ss<<":"<<uo.get_port()<<path<<"?EIO=3&transport=websocket";
|
||||
if(m_sid.size()>0){
|
||||
ss<<"&sid="<<m_sid;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user