Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae1dd1a353 | ||
|
|
5d6cebc982 |
No files matched your search
+1
-1
@@ -117,7 +117,7 @@ namespace ForwardingServer
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{//错误
|
{//错误
|
||||||
Console.WriteLine("Http:" + ex.ToString());
|
Console.WriteLine("[" + DateTime.Now.ToString("yyyy-MM-DD HH:mm:ss:fff") + "] Http:" + ex.ToString());
|
||||||
//client.SendAsync("Target instruction parsing error manager will close connection");
|
//client.SendAsync("Target instruction parsing error manager will close connection");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -37,13 +37,15 @@ namespace ForwardingServer
|
|||||||
{
|
{
|
||||||
DATA.MachineTable.Rows.Remove(row);
|
DATA.MachineTable.Rows.Remove(row);
|
||||||
}
|
}
|
||||||
Console.WriteLine("NOT ID " + client.Id + " IP " + client.IP);
|
Console.WriteLine("[" + DateTime.Now.ToString("yyyy-MM-DD HH:mm:ss:fff") + "] NOT ID " + client.Id + " IP " + client.IP);
|
||||||
|
|
||||||
return EasyTask.CompletedTask;
|
return EasyTask.CompletedTask;
|
||||||
};//有客户端断开连接
|
};//有客户端断开连接
|
||||||
service.Received = (client, e) =>{
|
service.Received = (client, e) =>{
|
||||||
string DAT = e.Memory.Span.ToString(Encoding.UTF8);
|
string DAT = e.Memory.Span.ToString(Encoding.UTF8);
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if (DAT.Length > 5)
|
||||||
{
|
{
|
||||||
DataRow[] r_ = DATA.MachineTable.Select("ID='" + client.Id + "'");
|
DataRow[] r_ = DATA.MachineTable.Select("ID='" + client.Id + "'");
|
||||||
if (r_.Length > 0)
|
if (r_.Length > 0)
|
||||||
@@ -74,7 +76,8 @@ namespace ForwardingServer
|
|||||||
Personm deserializedPerson = JsonSerializer.Deserialize<Personm>(DAT)!;
|
Personm deserializedPerson = JsonSerializer.Deserialize<Personm>(DAT)!;
|
||||||
DATA.MachineTable.Rows.Add(client.Id, client.IP, 30, "/" + deserializedPerson.SERVEREnterprise,
|
DATA.MachineTable.Rows.Add(client.Id, client.IP, 30, "/" + deserializedPerson.SERVEREnterprise,
|
||||||
deserializedPerson.SERVERMachineName, deserializedPerson.MachineVer);
|
deserializedPerson.SERVERMachineName, deserializedPerson.MachineVer);
|
||||||
Console.WriteLine("LINK ID "+client.Id+" IP "+ client.IP+" DATA "+ DAT);
|
Console.WriteLine("["+DateTime.Now.ToString("yyyy-MM-DD HH:mm:ss:fff")+"] LINK ID " + client.Id + " IP " + client.IP + "\n DATA =" + DAT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in new issue
Block a user