| | |
| | | this.clientSocket = socket; |
| | | this.meterParameter=meterParameter; |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | while (true) { |
| | | try { |
| | | System.out.println(clientSocket.getInetAddress().getHostAddress()+"客户端连接上了"); |
| | | InputStream in = clientSocket.getInputStream(); |
| | | ByteArrayOutputStream output = new ByteArrayOutputStream(); |
| | | |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | }else if(HexDLT645.indexOf("68")>-1){ |
| | | String HEX=HexDLT645.replace(" ", ""); |
| | | for (int i = 0; i < meterParameter.size(); i++) { |
| | |
| | | |
| | | }catch (Exception e){ |
| | | // |
| | | System.out.println("tcp电表客户端已断开连接---------"+e); |
| | | System.out.println("tcp���ͻ����ѶϿ�����---------"+e); |
| | | break; |
| | | } |
| | | |
| | |
| | | //System.out.println(inputLine); |
| | | // if (".".equals(inputLine)) { |
| | | // System.out.println(inputLine); |
| | | // System.out.println("tcp电表客户端已断开连接1---------"); |
| | | // System.out.println("tcp���ͻ����ѶϿ�����1---------"); |
| | | // //out.println("bye"); |
| | | // break; |
| | | // } |