Open oofaustoo opened 6 years ago
To answer my own question:
IO.Options sockopts = new IO.Options();
sockopts.Reconnection = true;
sockopts.ReconnectionAttempts = 10000;
sockopts.ReconnectionDelay = 10000;
sockopts.ReconnectionDelayMax = 10000;
sockopts.Timeout = 500;
sockopts.AutoConnect = true;
socket = IO.Socket (serverURL, sockopts);
That works fine, but my client appears to only be attempting a single reconnection...
When I stop my node.js server:
Disconnected from server (EVENT_DISCONNECT) Attempting reconnect (EVENT_RECONNECT_ATTEMPT) Reconnecting (EVENT_RECONNECTING)
I get nothing after this... Shouldn't the client attempt ReconnectionAttempts before giving up?
I will apologize in advance for the "newbie" question, but I am in a steep learning curve for Unity, C#, socketIO and node.js, BUT I would like to configure some client socket options when I create my IO.Socket object per:
var socket = IO.Socket("http://localhost:3000");
I see that there are available options:
But alas I am unable to find the magic incantation necessary.
I suspect it's in the realm of:
var socket = IO.Socket("http://localhost:3000", { some values in a dictionary });
??
Many thanks in advance if anyone is still around and listening.