|
|
@@ -101,10 +101,10 @@ public class SocketService extends Service {
|
|
|
connectThread = new Thread(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
-
|
|
|
socket = new Socket();
|
|
|
try {
|
|
|
/*超时时间为2秒*/
|
|
|
+ mylog.debug("连接机器人IP:" + Constant.robotModel.getRobotIp() + ",端口:" + Constant.robotModel.getPort());
|
|
|
socket.connect(new InetSocketAddress(Constant.robotModel.getRobotIp(), Constant.robotModel.getPort()), 15000);
|
|
|
/*连接成功的话 发送心跳包*/
|
|
|
if (socket.isConnected()) {
|