论坛首页 入门技术论坛

自己做的简单的web服务器

浏览 14610 次
该帖已经被评为新手帖
作者 正文
   发表时间:2009-06-16  
如果真想写,学学NIO吧!
0 请登录后投票
   发表时间:2009-06-16  
试试这个
package test;

/**
 *
 * @author bu gao su ni
 */
public class TestByteWord {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        byte[] xuke = new byte[]{-48,-20, -65, -53, -75,-60,119,101, 98, -73, -2, -50, -15,
            -58, -9, -78, -69, -76, -19,};
        System.out.println( new String(xuke) );
    }

}
0 请登录后投票
   发表时间:2009-06-16  
EdwardWorld 写道
试试这个
package test;

/**
 *
 * @author bu gao su ni
 */
public class TestByteWord {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        byte[] xuke = new byte[]{-48,-20, -65, -53, -75,-60,119,101, 98, -73, -2, -50, -15,
            -58, -9, -78, -69, -76, -19,};
        System.out.println( new String(xuke) );
    }

}

呵呵,谢谢鼓励
0 请登录后投票
   发表时间:2009-06-16  
我晕,单线程啊?
每次只能处理一个请求

起码也弄个线程池,能同时响应多请求吧
0 请登录后投票
   发表时间:2009-06-16  
不泼冷水了,比我强大。这东西,我连想都没想过自己去弄个。
0 请登录后投票
   发表时间:2009-06-17  
哪位看过How tomcat works.挺好的.虽然比较老

感觉讲的不错.

不过只看了一部分就没有时间看了.
0 请登录后投票
   发表时间:2009-06-17  
也比我强,都毕业工作了也没想过要自己写一个这样的东西
0 请登录后投票
   发表时间:2009-06-17  
楼主原来是想来招聘来着的啊。
0 请登录后投票
   发表时间:2009-06-17  
哈哈真好玩,一直也想写个
0 请登录后投票
   发表时间:2009-06-17  
  个个-----
0 请登录后投票
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics