|
|
|
@ -965,6 +965,14 @@ namespace Rs.MotionPlat.Entitys
|
|
|
|
|
clientSockets.Add(clientSocket);
|
|
|
|
|
IPEndPoint endPoint = ((IPEndPoint)clientSocket.RemoteEndPoint);
|
|
|
|
|
MessageQueue.Instance.Insert($"ip:{endPoint.Address.ToString()},port:{endPoint.Port.ToString()} connected!");
|
|
|
|
|
if (GlobalVar.IsSimTest)
|
|
|
|
|
{
|
|
|
|
|
if(endPoint.Address.ToString()!="127.0.0.1")
|
|
|
|
|
{
|
|
|
|
|
clientSocket.Close();
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ThreadPool.QueueUserWorkItem((obj) => {
|
|
|
|
|
List<byte> registData=new List<byte>();
|
|
|
|
|
Socket soct=(Socket)obj;
|
|
|
|
@ -984,11 +992,10 @@ namespace Rs.MotionPlat.Entitys
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
string content=Encoding.ASCII.GetString(registData.ToArray());
|
|
|
|
|
//MessageQueue.Instance.Insert($">>> ip:{ep.Address.ToString()},port:{ep.Port.ToString()},{content}");
|
|
|
|
|
string[] items = content.TrimEnd(new char[] { '$' }).Split('#');
|
|
|
|
|
Thread.Sleep(500);
|
|
|
|
|
Thread.Sleep(200);
|
|
|
|
|
string reg = "Register#1$";
|
|
|
|
|
int sendLen = clientSocket.Send(Encoding.ASCII.GetBytes(reg));
|
|
|
|
|
MessageQueue.Instance.Insert($" >>> ip:{ep.Address.ToString()},port:{ep.Port.ToString()},{reg}");
|
|
|
|
|