首页 > 代码库 > 【转载】全栈工程师系列

【转载】全栈工程师系列

这两天看了一篇文章,全栈工程师系列。可以参考。

 

http://www.shareditor.com/bloglistbytag/?tagname=%E6%95%99%E4%BD%A0%E6%88%90%E4%B8%BA%E5%85%A8%E6%A0%88%E5%B7%A5%E7%A8%8B%E5%B8%88%28Full+Stack+Developer%29

 

~]$ nc -l -p 8080GET / HTTP/1.1Host: 10.117.146.16:8080Connection: keep-aliveUpgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8Accept-Encoding: gzip, deflate, sdchAccept-Language: zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4,ja;q=0.2

继续敲写

HTTP/1.1 200 OKContent-Type: text/html; charset=UTF-8Connection: closehellohi<html><body><h1>hello</h1></body></html>

浏览器显示字符。

 

如果客户端(浏览器页面)关闭,则nc退出。

【转载】全栈工程师系列