| | |
| | | GsonConvert.getGson().toJson(data)); |
| | | |
| | | String ip = IpUtils.getBroadcastAddress(); |
| | | HdlSocketHelper.sendUdp(getUdpBoot(), ip, UDP_PORT, message, new HdlSocketHelper.HdlSocketListener() { |
| | | @Override |
| | | public void onSucceed(Object msg) { |
| | | if (callBack == null) return; |
| | | callBack.onSuccess("上报成功"); |
| | | LogUtils.i("UploadGatewayInfo onSucceed = " + msg); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure() { |
| | | if (callBack == null) return; |
| | | callBack.onError(HDLLinkException.getErrorWithCode(HDLLinkCode.HDL_UPLOAD_GATEWAYINFO_FAILURE_ERROR)); |
| | | LogUtils.i("UploadGatewayInfo onFailure"); |
| | | } |
| | | }); |
| | | HdlSocketHelper.sendUdp(getUdpBoot(), ip, UDP_PORT, message, null); |
| | | |
| | | } |
| | | |