安装
brew install nc
启动服务端(8001为端口号)
nc -l 8001
启动客户端
nc 127.0.0.1 8001
浏览器访问
给浏览器回信
HTTP/1.1 200 OK Content-Type: text/html; charset=UTF-8 Connection: close hello
安装
brew install nc
启动服务端(8001为端口号)
nc -l 8001
启动客户端
nc 127.0.0.1 8001
浏览器访问
给浏览器回信
HTTP/1.1 200 OK Content-Type: text/html; charset=UTF-8 Connection: close hello