A Simple Http Server with Java/Socket?

后端 未结 5 1220
耶瑟儿~
耶瑟儿~ 2020-11-29 03:11

I am currently creating a small HTTP server that returns a static page

Hello!

... I tried with sockets with Java:

  public sta         


        
5条回答
  •  既然无缘
    2020-11-29 03:23

    This is an answer to your last question only and the reason that nothing is visible in the browser is because you calculated the number of characters incorrectly.

    It should be 57 instead of 59.

    Better yet is to have the number of characters calculated automatically but I believe that your sample is just a sample.

提交回复
热议问题