添加信息
This commit is contained in:
commit
ae1dd1a353
1 file changed
+24
-24
+24
-24
@@ -47,42 +47,42 @@ namespace ForwardingServer
|
||||
{
|
||||
if (DAT.Length > 5)
|
||||
{
|
||||
DataRow[] r_ = DATA.MachineTable.Select("ID='" + client.Id + "'");
|
||||
if (r_.Length > 0)
|
||||
{
|
||||
int? s_ = r_.First().Field<int?>("Start");
|
||||
DataRow[] r_ = DATA.MachineTable.Select("ID='" + client.Id + "'");
|
||||
if (r_.Length > 0)
|
||||
{
|
||||
int? s_ = r_.First().Field<int?>("Start");
|
||||
|
||||
if (s_ == 30)
|
||||
if (s_ == 30)
|
||||
{
|
||||
if (DAT.StartsWith("{") || DAT.StartsWith("["))
|
||||
{
|
||||
if (DAT.StartsWith("{") || DAT.StartsWith("["))
|
||||
DATA.Person deserializedPerson = JsonSerializer.Deserialize<DATA.Person>(DAT)!;
|
||||
//转发逻辑
|
||||
var dr = DATA.UserTable.Select("Terminal='" + deserializedPerson.Terminal + "'");
|
||||
if (dr.Length > 0)
|
||||
{
|
||||
DATA.Person deserializedPerson = JsonSerializer.Deserialize<DATA.Person>(DAT)!;
|
||||
//转发逻辑
|
||||
var dr = DATA.UserTable.Select("Terminal='" + deserializedPerson.Terminal + "'");
|
||||
if (dr.Length > 0)
|
||||
{
|
||||
DataRow drEmployee = dr.First();
|
||||
drEmployee.BeginEdit();
|
||||
drEmployee["RDAT"] = DAT;
|
||||
drEmployee.EndEdit();
|
||||
drEmployee.AcceptChanges();
|
||||
}
|
||||
DataRow drEmployee = dr.First();
|
||||
drEmployee.BeginEdit();
|
||||
drEmployee["RDAT"] = DAT;
|
||||
drEmployee.EndEdit();
|
||||
drEmployee.AcceptChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Personm deserializedPerson = JsonSerializer.Deserialize<Personm>(DAT)!;
|
||||
DATA.MachineTable.Rows.Add(client.Id, client.IP, 30, "/" + deserializedPerson.SERVEREnterprise,
|
||||
deserializedPerson.SERVERMachineName, deserializedPerson.MachineVer);
|
||||
}
|
||||
else
|
||||
{
|
||||
Personm deserializedPerson = JsonSerializer.Deserialize<Personm>(DAT)!;
|
||||
DATA.MachineTable.Rows.Add(client.Id, client.IP, 30, "/" + deserializedPerson.SERVEREnterprise,
|
||||
deserializedPerson.SERVERMachineName, deserializedPerson.MachineVer);
|
||||
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)
|
||||
{//错误
|
||||
Console.WriteLine("Tcp:" + ex.ToString());
|
||||
Console.WriteLine("Tcp:" + ex.ToString());
|
||||
}
|
||||
|
||||
return EasyTask.CompletedTask;
|
||||
|
||||
Reference in new issue
Block a user