| | |
| | | package com.hdl.photovoltaic.internet; |
| | | |
| | | |
| | | import com.hdl.photovoltaic.other.HdlAccountLogic; |
| | | import com.hdl.sdk.link.core.callback.HDLLinkCallBack; |
| | | import com.hdl.sdk.link.gateway.HDLLinkLocalGateway; |
| | | |
| | |
| | | */ |
| | | public class TcpClient { |
| | | |
| | | private static volatile TcpClient sTcpClient; |
| | | |
| | | /** |
| | | * 获取当前对象 |
| | | * |
| | | * @return HdlAccountLogic |
| | | */ |
| | | public static synchronized TcpClient getInstance() { |
| | | if (sTcpClient == null) { |
| | | synchronized (TcpClient.class) { |
| | | if (sTcpClient == null) { |
| | | sTcpClient = new TcpClient(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | return sTcpClient; |
| | | } |
| | | |
| | | /** |
| | | * 发送数据到Link网关 |
| | | * |