Network debugging

This commit is contained in:
SCM6WE
2021-09-22 12:57:46 +02:00
parent 46cc5b1d10
commit 08325b1c65
4 changed files with 70 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
using Newtonsoft.Json.Linq;
using Json.Net;
using Newtonsoft.Json.Linq;
using System;
namespace PolyChat.Models
@@ -35,7 +36,8 @@ namespace PolyChat.Models
/// <param name="data"></param>
public Message(JToken data)
{
Message m = (Message) data[0].ToObject<Message>();
Message m = (Message) data.ToObject<Message>();
Sender = m.Sender;
Timestamp = m.Timestamp;
StringTimeStamp = Timestamp.ToString();
@@ -43,6 +45,11 @@ namespace PolyChat.Models
Ip = m.Ip;
Foreign = m.Foreign;
}
public Message()
{
}
override