摘要: public class Client { public static void main(String[] args) throws IOException { InetAddress address = InetAddress.getByName("localhost"); int port = 8800; byte[... 阅读全文
posted @ 2019-05-07 14:00 小小超plus 阅读(140) 评论(0) 推荐(0) 编辑
摘要: public class ServerThread extends Thread{ Socket socket = null; public ServerThread(Socket socket) { this.socket = socket; } @Override public void run() { // TODO ... 阅读全文
posted @ 2019-05-07 13:15 小小超plus 阅读(1455) 评论(0) 推荐(1) 编辑
摘要: public class Server { public static void main(String[] args) { try { ServerSocket serverSocket = new ServerSocket(8888); System.out.println("服务器即将启动,等待客户端的连接"); ... 阅读全文
posted @ 2019-05-07 12:36 小小超plus 阅读(236) 评论(0) 推荐(0) 编辑
摘要: public class Test { public static void main(String[] args) { // TODO Auto-generated method stub try { URL url = new URL("http://www.baidu.com"); InputStre... 阅读全文
posted @ 2019-05-07 12:05 小小超plus 阅读(498) 评论(0) 推荐(0) 编辑