标签:
import java.net.ServerSocket import java.io.OutputStreamWriter import java.io.BufferedWriter val listener = new ServerSocket(15209) val server = listener.accept val osServ = server.getOutputStream val writer = new BufferedWriter(new OutputStreamWriter(osServ)) writer.write("adsf\n") writer.flush import java.net.Socket import java.io.InputStreamReader import java.io.BufferedReader val skt = new Socket("10.237.62.52", 15209) val isc = skt.getInputStream val reader = new BufferedReader(new InputStreamReader(isc)) reader.readLine
标签:
原文地址:http://www.cnblogs.com/suanec/p/5835612.html