Ascii on TCP socket
问题 Anyone could pass me an example of sending Ascii msg over TCP?(couldnt find example on the net) thanks, ray. 回答1: Here's an example of writing to and reading from an echoing server. A simplified excerpt: Socket echoSocket = null; PrintWriter out = null; BufferedReader in = null; try { echoSocket = new Socket("taranis", 7); out = new PrintWriter(echoSocket.getOutputStream(), true); in = new BufferedReader(new InputStreamReader( echoSocket.getInputStream())); } catch (UnknownHostException e) {