JAVA用SOCKET通信发送数据。:::
public void test() throws UnknownHostException, IOException { Socket client = new Socket("172.1.1.1",8808); PrintWriter pw = new PrintWriter(client.getOutputStream()); pw.println(this.formatStr()); pw.close(); client.close(); }
public void test() throws UnknownHostException, IOException { Socket client = new Socket("172.1.1.1",8808); PrintWriter pw = new PrintWriter(client.getOutputStream()); pw.println(this.formatStr()); pw.close(); client.close(); }