Java two- way socket connection (server/ client)
问题 what I'm trying to do is to send some JSON from an Android phone to a Java server, which works fine. The Android/ client side looks like this: Socket s = new Socket("192.168.0.36", 12390); s.setSoTimeout(1500); JSONObject json = new JSONObject(); json.put("emergency", false); json.put("imei", imei); json.put("lat", l.getLatitude()); json.put("lon", l.getLongitude()); json.put("acc", l.getAccuracy()); json.put("time", l.getTime()); BufferedWriter out = new BufferedWriter(new OutputStreamWriter