1、修复在于Hexcal 补偿过程中的通讯问题;2、改变监听端口方式,改为监听所有端口,不在固定 测量机默认IP 100.0.0.1 ;
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using HexcalMC.Base;
|
||||
using Timer = System.Windows.Forms.Timer;
|
||||
|
||||
namespace HexcalMC.Hexcal
|
||||
@@ -64,8 +65,8 @@ namespace HexcalMC.Hexcal
|
||||
{
|
||||
try
|
||||
{
|
||||
_serverTimer.Tick += ServerTimerLoop; //510,增加时钟,判断是否有断掉的连接。
|
||||
_serverTimer.Start();
|
||||
//_serverTimer.Tick += ServerTimerLoop; //510,增加时钟,判断是否有断掉的连接。
|
||||
//_serverTimer.Start();
|
||||
|
||||
_mWatchSocket =
|
||||
new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); //创建负责监听的套接字,注意其中的参数;
|
||||
@@ -304,6 +305,7 @@ namespace HexcalMC.Hexcal
|
||||
{
|
||||
success = TrySendData(soc, arrMsg);
|
||||
attemptCount++;
|
||||
DebugDfn.AddLogText("正在重发");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -382,7 +384,7 @@ namespace HexcalMC.Hexcal
|
||||
for (int i = _dictSocket.Values.ToArray().Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (_dictSocket.Values.ToArray()[i]
|
||||
.Poll(10, SelectMode.SelectRead)) //10毫秒,检查套接字状态, SelectMode 参数指定要监视的套接字的类别。
|
||||
.Poll(100, SelectMode.SelectRead)) //10毫秒,检查套接字状态, SelectMode 参数指定要监视的套接字的类别。
|
||||
{
|
||||
// DictSocket.Remove(DictSocket.Keys.ToArray()[i]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user