|
@@ -35,7 +35,7 @@ public class Client : MonoBehaviour
|
|
|
double last_ping_time = 0;
|
|
|
static string[] Servers = { "dev.prmsys.net", "localhost", "corp.prmsys.net" };
|
|
|
static bool ShowPacketsSent = true;
|
|
|
- static bool printPacketsShort = true;
|
|
|
+ static bool printPacketsShort = false;
|
|
|
static bool ShowPackets = true; //ставится только в редакторе
|
|
|
double initial_timer;
|
|
|
int internal_timer = 0;
|
|
@@ -92,7 +92,7 @@ public class Client : MonoBehaviour
|
|
|
Register(55, ImageReceive);
|
|
|
Register(57, Location.TextureGetURL);
|
|
|
Register(58, User.LogInOut, 6);
|
|
|
- Register(59, RemoteAssistCallCallback, 10);
|
|
|
+ Register(59, RemoteAssistCallCallback);
|
|
|
|
|
|
//set data path
|
|
|
//if (Application.platform == RuntimePlatform.WindowsWebPlayer ||
|
|
@@ -184,7 +184,16 @@ public class Client : MonoBehaviour
|
|
|
break;
|
|
|
case RemoteAssistCMD.SMOPP_TASK_INFO:
|
|
|
uint taskId = BitConverter.ToUInt32(bytedata, 10);
|
|
|
- Debug.Log(taskId);
|
|
|
+
|
|
|
+ int nameLen = BitConverter.ToInt32(bytedata, 14);
|
|
|
+ string name = Encoding.UTF8.GetString(bytedata, 18, nameLen);
|
|
|
+ Debug.Log("taskId " + taskId + " Команда "+name +" Команда " + name + " name "+name);
|
|
|
+
|
|
|
+ var user = User.Find(remoteScript_.SessionCallerId);
|
|
|
+ if (user != null)
|
|
|
+ remoteScript_.callerName_.text = $"Звонок от [{ user.id }] { user.name} Проблема с командой: [{taskId}] {name}";
|
|
|
+ else
|
|
|
+ remoteScript_.callerName_.text = $"Звонок от сотрудника [ID: { remoteScript_.SessionCallerId }] Проблема с командой: [{taskId}] {name}";
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -334,6 +343,8 @@ public class Client : MonoBehaviour
|
|
|
if (!PacketLength.ContainsKey(num))
|
|
|
{
|
|
|
var rest = data.Length - offset;
|
|
|
+ //Debug.Log("GetLength rest " + rest+" offset "+ offset);
|
|
|
+ //printBytes(data);
|
|
|
//packet not full
|
|
|
if (rest < 5)
|
|
|
return 1;
|