hi,
I used this plugin ( dev branch and socket io version is 2) for connecting my game to socket io and handling Listeners and Emit.
so when I disconnect to the server my connection has closed but when i want to reconnect to the server in runtime after disconnecting , i think it cant connect to server correctly.
this is my connection script for this :
socketConnection = Socket.Connect(socketUrl);
socketConnection.On(SystemEvents.connectError , (Exception e) => {
Debug.Log("Socket.io Connection Error: " + e.ToString());
Socket.Reconnect(socketConnection);
});
socketConnection.On(SystemEvents.connect, () =>
{
Debug.Log("Connected To Server");
});
socketConnection.On(SystemEvents.reconnect, (int reconnectAttempt) =>
{
Debug.Log("Reconnecting : " + reconnectAttempt);
});
socketConnection.On(SystemEvents.disconnect, () =>
{
Debug.Log("Connection is Closed");
});
f.e when i connect to server for the first time i have this logs
[Singleton] An instance of socket.io.SocketManager is needed in the scene, so '(singleton) socket.io.SocketManager
socket.io => ws://localhost:6500/socket.io/?EIO=3&transport=websocket&sid=399_XTZwOOSCQmckAACk probed~
socket.io => ws://localhost:6500/socket.io/?EIO=3&transport=websocket&sid=399_XTZwOOSCQmckAACk ping~
socket.io => ws://localhost:6500/socket.io/?EIO=3&transport=websocket&sid=399_XTZwOOSCQmckAACk pong~
but when i want to connect for the seccond time in runtime i just have this
socket.io => ws://localhost:6500/socket.io/?EIO=3&transport=websocket&sid=399_XTZwOOSCQmckAACk probed~
and i should mention this that i test Reconnect after an initial connection failure #34 issue and it couldnt help me
please check it and help me.
hi,
I used this plugin ( dev branch and socket io version is 2) for connecting my game to socket io and handling Listeners and Emit.
so when I disconnect to the server my connection has closed but when i want to reconnect to the server in runtime after disconnecting , i think it cant connect to server correctly.
this is my connection script for this :
f.e when i connect to server for the first time i have this logs
but when i want to connect for the seccond time in runtime i just have this
and i should mention this that i test Reconnect after an initial connection failure #34 issue and it couldnt help me
please check it and help me.