• 大小: 0.01M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-28
  • 语言: Java
  • 标签:

资源简介

  web自定义服务器

资源截图

代码片段和文件信息

package org.taidu.jerrymouse.server;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;

public class SocketClientDemo {

/**
 * @param args
 * @throws IOException
 * @throws UnknownHostException
 */
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
Socket client = new Socket(“localhost“ 8080);

PrintWriter pw = new PrintWriter(client.getOutputStream());

pw.println(“GET /web/index.jsp HTTP/1.1“);
pw.println(“Host: localhost:8080“);
pw.println(“User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:48.0) Gecko/20100101

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        302  2016-09-06 09:02  JerryMouse\.classpath

     文件        386  2016-09-06 09:02  JerryMouse\.project

     文件        629  2016-09-06 09:02  JerryMouse\.settings\org.eclipse.jdt.core.prefs

     文件       2914  2016-09-11 09:02  JerryMouse\bin\org\taidu\jerrymouse\server\impl\ServerRun.class

     文件       1161  2016-09-11 09:16  JerryMouse\bin\org\taidu\jerrymouse\server\impl\SimpleServer.class

     文件       2291  2016-09-11 08:38  JerryMouse\bin\org\taidu\jerrymouse\server\SocketClientDemo.class

     文件       2747  2016-09-11 08:56  JerryMouse\bin\org\taidu\jerrymouse\server\SocketServerDemo.class

     文件        633  2016-09-11 09:04  JerryMouse\bin\org\taidu\jerrymouse\test\Test.class

     文件        705  2016-09-06 16:48  JerryMouse\bin\org\taidu\jerrymouse\thread\Demo.class

     文件        624  2016-09-06 16:48  JerryMouse\bin\org\taidu\jerrymouse\thread\RunnableDemo.class

     文件        547  2016-09-06 16:48  JerryMouse\bin\org\taidu\jerrymouse\thread\ThreadDemo.class

     文件        382  2016-09-11 08:51  JerryMouse\bin\org\taidu\jerrymouse\util\StrPath.class

     文件       2069  2016-09-11 09:02  JerryMouse\src\org\taidu\jerrymouse\server\impl\ServerRun.java

     文件        697  2016-09-11 09:16  JerryMouse\src\org\taidu\jerrymouse\server\impl\SimpleServer.java

     文件       1558  2016-09-11 08:38  JerryMouse\src\org\taidu\jerrymouse\server\SocketClientDemo.java

     文件       1707  2016-09-11 08:56  JerryMouse\src\org\taidu\jerrymouse\server\SocketServerDemo.java

     文件        344  2016-09-11 09:04  JerryMouse\src\org\taidu\jerrymouse\test\Test.java

     文件        406  2016-09-06 16:48  JerryMouse\src\org\taidu\jerrymouse\thread\Demo.java

     文件        244  2016-09-06 16:48  JerryMouse\src\org\taidu\jerrymouse\thread\RunnableDemo.java

     文件        189  2016-09-06 16:48  JerryMouse\src\org\taidu\jerrymouse\thread\ThreadDemo.java

     文件        125  2016-09-11 08:51  JerryMouse\src\org\taidu\jerrymouse\util\StrPath.java

     目录          0  2016-09-11 08:48  JerryMouse\bin\org\taidu\jerrymouse\server\impl

     目录          0  2016-09-11 08:48  JerryMouse\src\org\taidu\jerrymouse\server\impl

     目录          0  2016-09-11 08:13  JerryMouse\bin\org\taidu\jerrymouse\server

     目录          0  2016-09-11 09:04  JerryMouse\bin\org\taidu\jerrymouse\test

     目录          0  2016-09-06 16:48  JerryMouse\bin\org\taidu\jerrymouse\thread

     目录          0  2016-09-11 08:51  JerryMouse\bin\org\taidu\jerrymouse\util

     目录          0  2016-09-11 08:13  JerryMouse\src\org\taidu\jerrymouse\server

     目录          0  2016-09-11 09:04  JerryMouse\src\org\taidu\jerrymouse\test

     目录          0  2016-09-06 16:48  JerryMouse\src\org\taidu\jerrymouse\thread

............此处省略14个文件信息

评论

共有 条评论

相关资源