跳转重新建立连接时,需要重新打开关闭控制器,否则无法建立新连接接收数据的委托
This commit is contained in:
parent
e6c5a19caa
commit
ffa46b0f59
|
@ -598,6 +598,8 @@ bool TokenClient::ChangeIPEndPoint(const NetUri& uri)
|
||||||
delete socket;
|
delete socket;
|
||||||
socket = Socket::CreateRemote(uri);
|
socket = Socket::CreateRemote(uri);
|
||||||
ctrl->_Socket = socket;
|
ctrl->_Socket = socket;
|
||||||
|
ctrl->Close();
|
||||||
|
ctrl->Open();
|
||||||
|
|
||||||
/*ctrl->Port->Close();
|
/*ctrl->Port->Close();
|
||||||
socket->Remote.Port = uri.Port;
|
socket->Remote.Port = uri.Port;
|
||||||
|
|
|
@ -79,6 +79,11 @@
|
||||||
<ClCompile Include="..\Drivers\BufferPort.cpp" />
|
<ClCompile Include="..\Drivers\BufferPort.cpp" />
|
||||||
<ClCompile Include="..\Drivers\DHT11.cpp" />
|
<ClCompile Include="..\Drivers\DHT11.cpp" />
|
||||||
<ClCompile Include="..\Drivers\Enc28j60.cpp" />
|
<ClCompile Include="..\Drivers\Enc28j60.cpp" />
|
||||||
|
<ClCompile Include="..\Drivers\Esp8266\Esp8266.cpp" />
|
||||||
|
<ClCompile Include="..\Drivers\Esp8266\EspSocket.cpp" />
|
||||||
|
<ClCompile Include="..\Drivers\Esp8266\EspTcp.cpp" />
|
||||||
|
<ClCompile Include="..\Drivers\Esp8266\EspUdp.cpp" />
|
||||||
|
<ClCompile Include="..\Drivers\Esp8266\WaitExpect.cpp" />
|
||||||
<ClCompile Include="..\Drivers\HX711.cpp" />
|
<ClCompile Include="..\Drivers\HX711.cpp" />
|
||||||
<ClCompile Include="..\Drivers\JTW8953.cpp" />
|
<ClCompile Include="..\Drivers\JTW8953.cpp" />
|
||||||
<ClCompile Include="..\Drivers\NRF24L01.cpp" />
|
<ClCompile Include="..\Drivers\NRF24L01.cpp" />
|
||||||
|
|
|
@ -545,5 +545,20 @@
|
||||||
<ClCompile Include="..\App\ACZero.cpp">
|
<ClCompile Include="..\App\ACZero.cpp">
|
||||||
<Filter>App</Filter>
|
<Filter>App</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Drivers\Esp8266\Esp8266.cpp">
|
||||||
|
<Filter>Drivers\Esp8266</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Drivers\Esp8266\EspSocket.cpp">
|
||||||
|
<Filter>Drivers\Esp8266</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Drivers\Esp8266\EspTcp.cpp">
|
||||||
|
<Filter>Drivers\Esp8266</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Drivers\Esp8266\EspUdp.cpp">
|
||||||
|
<Filter>Drivers\Esp8266</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\Drivers\Esp8266\WaitExpect.cpp">
|
||||||
|
<Filter>Drivers\Esp8266</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in New Issue