socket.io-client-cpp icon indicating copy to clipboard operation
socket.io-client-cpp copied to clipboard

How use option path like socket.io-client for JavaScript?

Open lminhtu31 opened this issue 7 years ago • 3 comments

With client-side JavaScript: var socket = io('http://127.0.0.1:8080', { path: '/myapp/notify' })

But I can't find path option in this library. In API documents, I saw: h.connect("http://127.0.0.1:8080") without path option.

Because my socket.io server deploy on a sub-domain with NginX. On server-side: var io = require('socket.io')(http, { path: '/myapp/notify' });

So my question is: How use option path like socket.io-client for JavaScript?

lminhtu31 avatar Feb 04 '18 11:02 lminhtu31

Did we get an answer on this? Or is this not supported?

divmgl avatar Apr 13 '18 10:04 divmgl

I can confirm that this is officially not supported by this library due to the following line:

https://github.com/socketio/socket.io-client-cpp/blob/master/src/internal/sio_client_impl.cpp#L218

divmgl avatar Apr 13 '18 10:04 divmgl

I was hit by this today. Kinda annoying...

arximboldi avatar Feb 17 '19 14:02 arximboldi