摘要:
public class Client { public static void main(String[] args) throws IOException { InetAddress address = InetAddress.getByName("localhost"); int port = 8800; byte[... 阅读全文
摘要:
public class ServerThread extends Thread{ Socket socket = null; public ServerThread(Socket socket) { this.socket = socket; } @Override public void run() { // TODO ... 阅读全文
摘要:
public class Server { public static void main(String[] args) { try { ServerSocket serverSocket = new ServerSocket(8888); System.out.println("服务器即将启动,等待客户端的连接"); ... 阅读全文
摘要:
public class Test { public static void main(String[] args) { // TODO Auto-generated method stub try { URL url = new URL("http://www.baidu.com"); InputStre... 阅读全文