/**
* 调试Socket
* @param argv
*/
public static void main(String argv[]){
BufferedReader in;
Socket socket;
PrintWriter out;
try {
socket = new Socket("172.16.72.149",1234);
in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
out = new PrintWriter(socket.getOutputStream(),true);
//输入经纬度
BufferedReader line = new BufferedReader(new InputStreamReader(new ByteArrayInputStream("11645295,3993528/n".getBytes())));
out.println(line.readLine());
out.flush();
//取得返回的值
System.out.println(in.readLine());
line.close();
out.close();
in.close();
socket.close();
} catch (UnknownHostException e) {
// TODO 自动生成 catch 块
e.printStackTrace();
} catch (IOException e) {
// TODO 自动生成 catch 块
e.printStackTrace();
}
}
* 调试Socket
* @param argv
*/
public static void main(String argv[]){
BufferedReader in;
Socket socket;
PrintWriter out;
try {
socket = new Socket("172.16.72.149",1234);
in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
out = new PrintWriter(socket.getOutputStream(),true);
//输入经纬度
BufferedReader line = new BufferedReader(new InputStreamReader(new ByteArrayInputStream("11645295,3993528/n".getBytes())));
out.println(line.readLine());
out.flush();
//取得返回的值
System.out.println(in.readLine());
line.close();
out.close();
in.close();
socket.close();
} catch (UnknownHostException e) {
// TODO 自动生成 catch 块
e.printStackTrace();
} catch (IOException e) {
// TODO 自动生成 catch 块
e.printStackTrace();
}
}