Hi! New issue.
I don't receive OnDisconnect if i connect to dev server and turn off wifi. Why is that happening?
Unity 2018.2.1f1, Latest PIO Unity SDK.
How to resolve this issue?
by Henrik » August 18th, 2018, 10:06 am
by KVADRO » August 19th, 2018, 9:48 am
by KVADRO » August 19th, 2018, 12:43 pm
2018-08-19 14:42:10.615054+0300 ProductName[6053:3850585] TIC TCP Conn Failed [4:0x1c0178780]: 1:50 Err(50)
2018-08-19 14:42:10.654557+0300 ProductName[6053:3850585] Task <F771351C-141D-41E8-BA93-E710ABA381E1>.<0> HTTP load failed (error code: -1009 [1:50])
2018-08-19 14:42:10.654743+0300 ProductName[6053:3849871] NSURLConnection finished with error - code -1009
-> applicationDidBecomeActive()
2018-08-19 14:42:12.167362+0300 ProductName[6053:3850585] TIC TCP Conn Failed [5:0x1c0178480]: 1:50 Err(50)
2018-08-19 14:42:12.172389+0300 ProductName[6053:3850585] Task <EF45C07F-FE4D-4767-A982-32210A57076A>.<0> HTTP load failed (error code: -1009 [1:50])
2018-08-19 14:42:12.172772+0300 ProductName[6053:3850585] NSURLConnection finished with error - code -1009
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PlayerIOClient;
public class tat : MonoBehaviour {
private Client m_client;
private Connection m_conn;
// Use this for initialization
void Start () {
System.Random random = new System.Random();
string userid = "Guest" + random.Next(0, 10000);
PlayerIO.UseSecureApiRequests = true;
PlayerIO.Authenticate("application id"
, "public"
, new Dictionary<string, string>() {{ "userId", userid }}
, null
, delegate(Client _client)
{
m_client = _client;
Multiplayer m_multiplayer = _client.Multiplayer;
m_multiplayer.CreateJoinRoom(null
, "ClassicPvPRoom"
, true
, null
, null
, delegate(Connection _connection)
{
Debug.Log("Connected");
m_conn = _connection;
m_conn.OnMessage += delegate(object _sender, Message _msg)
{
Debug.Log(_msg.ToString());
};
m_conn.OnDisconnect += delegate(object _sender, string _str)
{
Debug.Log("DIsconnected");
};
}
, delegate(PlayerIOError _error)
{
Debug.Log("Can't connect");
});
}
, delegate(PlayerIOError _error)
{
Debug.Log("Can't auth");
});
}
// Update is called once per frame
void Update () {
}
}
by Henrik » September 8th, 2018, 6:26 am
by KVADRO » September 15th, 2018, 12:32 pm
by KVADRO » September 15th, 2018, 7:14 pm