安装
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
通过nc命令模拟客户端或服务器端程序
阅读 81
2022-03-10
安装
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
相关推荐
精彩评论(0)