为了账号安全,请及时绑定邮箱和手机立即绑定

http.Server 中的端口“:http”是什么意思?

http.Server 中的端口“:http”是什么意思?

Go
MMTTMM 2021-10-25 16:14:57
我正在阅读http.Server文档中的类型声明,我遇到了这个。type Server struct {    Addr string // TCP address to listen on, ":http" if empty    // more...}如果调用srv.ListenAndServe()并且srv.Addr是空字符串,ListenAndServe则将传递":http"给net.Listen( http/server.go )。什么":http"意思?
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 199 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号