含义:
TCP
含义:
Socket socket = new Socket(ip地址,port端口); InputStream is = socket.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line; while((line = br.readLine()) != null){ System.out.println(line); }Socket socket = new Socket(ip地址,port端口)
UDP
含义: