had issue with il2cpp
now i am on latest version of unity and of tnet but i get from time to time "no valid socket warning" and from the phone doesnt work and the whole connection process goes very slow.
any idea?
in my code i do this:
void Update () {
if (Application.loadedLevelName == NUtils.LOBBY_SCENE) {
if (Time.time > NextRefreshUpdate)
{
if (SERVER_CONNECTED)
{
TNManager.client.BeginSend(Packet.RequestChannelList);
TNManager.client.EndSend();
}
NextRefreshUpdate = Time.time + RefreshOffsetRate;
}
}
}
and i get a lot of no valid socket while i stay in the scene ready to click to connect to the server.
the line triggering the no valid socket is : TNManager.client.EndSend();
the no valid socket comes from this class:
public class TcpProtocol : Player....
...
}
else
{
#if UNITY_EDITOR
UnityEngine.Debug.LogWarning("No valid socket");
#endif
buffer.Recycle();
}
}