[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"site-config":3,"primary-menu":20,"cat-network":99,"catposts-network":112,"post-detail-post-net-tcp-three-way-88b96e5c":221},{"config":4,"socialLinks":19},{"title":5,"subtitle":6,"logoUrl":7,"faviconUrl":8,"footerText":9,"beianIcp":10,"beianPublicSecurity":9,"seoDescription":11,"seoKeywords":12,"homepageTitle":13,"homepageSubtitle":14,"analyticsHeadCode":15,"planetQrcodeUrl":16,"planetIntroHtml":9,"planetCtaText":17,"updatedAt":18},"编码世界","用编码改变世界","\u002Fupload\u002F2026\u002F09\u002F2f277021172f43f6bb34e1c115760b7f.png","\u002Fupload\u002F2026\u002F09\u002Fdcbad022e68c4a729a5dc4997a9bba8a.png","","苏ICP备2026073884号","编码世界（mashangan.com）是面向 Java 后端与 Go 语言的系统化编程教程站：提供\nMyBatis Plus、Lombok、Java 8、IDEA、Docker 等原创图文教程，以及 JVM、并发、\nSpring、MySQL、Redis、消息队列、计算机网络等大厂面试八股题库，另有可落地的\n项目实战系列，帮你从入门到精通。","编码世界,Java教程,Go语言教程,Docker教程,MyBatis Plus教程,Lombok教程, Java 8新特性,IDEA教程,Java面试题,八股文,JVM面试题,Java并发面试题, MySQL面试题,Redis面试题,Spring面试题,消息队列面试题,高并发,分库分表, Netty面试题,计算机网络面试题,AI Agent,RAG,程序员学习路线","Java全栈系统化编程教程","覆盖 MyBatis Plus、Lombok、Java 8、IDEA、Go、Docker 等原创图文教程，配套大厂面试八股题库，从入门到精通，持续更新","\u003Cscript>\nvar _hmt = _hmt || [];\n(function() {\n  var hm = document.createElement(\"script\");\n  hm.src = \"https:\u002F\u002Fhm.baidu.com\u002Fhm.js?f00af7e56d956c02e11efed4131379b0\";\n  var s = document.getElementsByTagName(\"script\")[0]; \n  s.parentNode.insertBefore(hm, s);\n})();\n\u003C\u002Fscript>\n","\u002Fupload\u002F2026\u002F09\u002Fc1a8f5de46584d3eb0bc762c180a5db9.png","扫码加入知识星球","2026-09-29T14:56:02.498693Z",[],{"metadata":21,"spec":24,"menuItems":34},{"name":22,"creationTimestamp":23},"primary","2026-09-12T06:13:55.024154Z",{"displayName":25,"menuItems":26},"主菜单",[27,28,29,30,31,32,33],"88c3f10b-321c-4092-86a8-70db00251b74","menu-item-izrtmxer","c4c814d1-0c2c-456b-8c96-4864965fee94","menu-item-column","menu-item-tools","menu-item-zsxq","menu-item-ocrxlczu",[35,44,54,63,72,81,90],{"displayName":36,"metadata":37,"spec":39,"status":42,"children":43},"首页",{"name":27,"creationTimestamp":38},"2026-09-12T06:13:54.422830Z",{"displayName":36,"href":40,"priority":41,"menuName":22},"\u002F",0,{"displayName":36,"href":40},[],{"displayName":45,"metadata":46,"spec":48,"status":52,"children":53},"Java面试八股",{"name":28,"creationTimestamp":47},"2026-09-13T09:42:02.854891Z",{"displayName":45,"href":49,"target":50,"priority":51,"menuName":22},"\u002Fjava-interview","_self",1,{"displayName":45,"href":49},[],{"displayName":55,"metadata":56,"spec":58,"status":61,"children":62},"文章",{"name":29,"creationTimestamp":57},"2026-09-12T06:13:54.457307Z",{"displayName":55,"href":59,"priority":60,"menuName":22},"\u002Farchives",2,{"displayName":55,"href":59},[],{"displayName":64,"metadata":65,"spec":67,"status":70,"children":71},"项目实战",{"name":30,"creationTimestamp":66},"2026-09-14T00:35:08.138170Z",{"displayName":64,"href":68,"target":50,"priority":69,"menuName":22},"\u002Fcolumn",3,{"displayName":64,"href":68},[],{"displayName":73,"metadata":74,"spec":76,"status":79,"children":80},"在线工具",{"name":31,"creationTimestamp":75},"2026-09-14T00:35:08.171474Z",{"displayName":73,"href":77,"target":50,"priority":78,"menuName":22},"\u002Ftools",4,{"displayName":73,"href":77},[],{"displayName":82,"metadata":83,"spec":85,"status":88,"children":89},"知识星球",{"name":32,"creationTimestamp":84},"2026-09-14T00:35:08.199145Z",{"displayName":82,"href":86,"target":50,"priority":87,"menuName":22},"\u002Fzsxq",5,{"displayName":82,"href":86},[],{"displayName":91,"metadata":92,"spec":94,"status":97,"children":98},"特价云服务器",{"name":33,"creationTimestamp":93},"2026-09-25T15:30:59.201614Z",{"displayName":91,"href":95,"target":50,"priority":96,"menuName":22},"\u002Fserver",6,{"displayName":91,"href":95},[],{"metadata":100,"spec":105,"status":110,"postCount":87},{"name":101,"creationTimestamp":102,"labels":103},"network","2026-09-13T09:13:25.868986Z",{"haloweb.section":104},"interview",{"displayName":106,"slug":101,"cover":9,"description":107,"priority":108,"hideFromList":109,"preventParentPostCascadeQuery":109},"计算机网络面试题","计算机网络面试题：TCP\u002FIP、HTTP\u002FHTTPS、握手挥手、DNS 与常见网络问题排查。",24,false,{"permalink":111,"postCount":87,"visiblePostCount":87},"\u002Fcategories\u002Fnetwork",[113,137,158,179,200],{"metadata":114,"spec":117,"status":126,"categories":131},{"name":115,"creationTimestamp":116},"post-net-http-status-0d879b34","2026-09-13T10:01:06.196220Z",{"title":118,"slug":119,"cover":9,"excerpt":120,"publishTime":122,"categories":123,"tags":124,"priority":41,"pinned":109,"deleted":109,"visible":125,"allowComment":121},"常见 HTTP 状态码？","net-http-status",{"raw":9,"autoGenerate":121},true,"2026-09-13T10:01:06.253755Z",[101],[],"PUBLIC",{"permalink":127,"excerpt":128,"lastModifyTime":129,"phase":130},"\u002Farchives\u002Fnet-http-status","一、1xx 信息 100 Continue：继续发送。 二、2xx 成功 200 OK：请求成功。 201 Created：资源创建成功。 204 No Content：成功但无响应体。 206 Partial Content：范围请求。 三、3xx 重定向 301 Moved Permanentl","2026-09-16T09:14:44.134667Z","PUBLISHED",[132],{"metadata":133,"spec":135,"status":136,"postCount":87},{"name":101,"creationTimestamp":102,"labels":134},{"haloweb.section":104},{"displayName":106,"slug":101,"cover":9,"description":107,"priority":108,"hideFromList":109,"preventParentPostCascadeQuery":109},{"permalink":111,"postCount":87,"visiblePostCount":87},{"metadata":138,"spec":141,"status":148,"categories":152},{"name":139,"creationTimestamp":140},"post-net-http-https-ab8b6109","2026-09-13T10:01:05.852794Z",{"title":142,"slug":143,"cover":9,"excerpt":144,"publishTime":145,"categories":146,"tags":147,"priority":41,"pinned":109,"deleted":109,"visible":125,"allowComment":121},"HTTP 和 HTTPS 的区别？","net-http-https",{"raw":9,"autoGenerate":121},"2026-09-13T10:01:06.045966Z",[101],[],{"permalink":149,"excerpt":150,"lastModifyTime":151,"phase":130},"\u002Farchives\u002Fnet-http-https","一、核心区别 HTTPS = HTTP + TLS\u002FSSL，在 HTTP 和 TCP 之间加了加密层。 二、对比 维度 HTTP HTTPS 端口 80 443 传输 明文 加密 证书 不需要 需要 CA 证书 安全 易被窃听\u002F篡改 机密性+完整性+身份认证 性能 较快 略慢（TLS 握手） 三、T","2026-09-16T09:14:46.033294Z",[153],{"metadata":154,"spec":156,"status":157,"postCount":87},{"name":101,"creationTimestamp":102,"labels":155},{"haloweb.section":104},{"displayName":106,"slug":101,"cover":9,"description":107,"priority":108,"hideFromList":109,"preventParentPostCascadeQuery":109},{"permalink":111,"postCount":87,"visiblePostCount":87},{"metadata":159,"spec":162,"status":169,"categories":173},{"name":160,"creationTimestamp":161},"post-net-tcp-vs-udp-39b5d32e","2026-09-13T10:01:05.685781Z",{"title":163,"slug":164,"cover":9,"excerpt":165,"publishTime":166,"categories":167,"tags":168,"priority":41,"pinned":109,"deleted":109,"visible":125,"allowComment":121},"TCP 和 UDP 的区别？","net-tcp-vs-udp",{"raw":9,"autoGenerate":121},"2026-09-13T10:01:05.743404Z",[101],[],{"permalink":170,"excerpt":171,"lastModifyTime":172,"phase":130},"\u002Farchives\u002Fnet-tcp-vs-udp","一、对比 维度 TCP UDP 连接 面向连接 无连接 可靠性 可靠 不可靠 顺序 保证 不保证 流量控制 有 无 拥塞控制 有 无 首部大小 20~60 字节 8 字节 性能 较低 较高 二、TCP 保证可靠的机制 序列号 + 确认应","2026-09-16T09:14:43.649091Z",[174],{"metadata":175,"spec":177,"status":178,"postCount":87},{"name":101,"creationTimestamp":102,"labels":176},{"haloweb.section":104},{"displayName":106,"slug":101,"cover":9,"description":107,"priority":108,"hideFromList":109,"preventParentPostCascadeQuery":109},{"permalink":111,"postCount":87,"visiblePostCount":87},{"metadata":180,"spec":183,"status":190,"categories":194},{"name":181,"creationTimestamp":182},"post-net-tcp-four-way-bc1b2a69","2026-09-13T10:01:05.371016Z",{"title":184,"slug":185,"cover":9,"excerpt":186,"publishTime":187,"categories":188,"tags":189,"priority":41,"pinned":109,"deleted":109,"visible":125,"allowComment":121},"TCP 四次挥手过程？","net-tcp-four-way",{"raw":9,"autoGenerate":121},"2026-09-13T10:01:05.571824Z",[101],[],{"permalink":191,"excerpt":192,"lastModifyTime":193,"phase":130},"\u002Farchives\u002Fnet-tcp-four-way","一、过程 客户端发 FIN=1, seq=u，进入 FIN_WAIT_1。 服务端回 ACK=1, ack=u+1，进入 CLOSE_WAIT；客户端进入 FIN_WAIT_2。 服务端发完数据后发 FIN=1, seq=w，进入 LAST_ACK。 客户端回 ACK=1, ack=w+1，进入 T","2026-09-16T09:14:45.072516Z",[195],{"metadata":196,"spec":198,"status":199,"postCount":87},{"name":101,"creationTimestamp":102,"labels":197},{"haloweb.section":104},{"displayName":106,"slug":101,"cover":9,"description":107,"priority":108,"hideFromList":109,"preventParentPostCascadeQuery":109},{"permalink":111,"postCount":87,"visiblePostCount":87},{"metadata":201,"spec":204,"status":211,"categories":215},{"name":202,"creationTimestamp":203},"post-net-tcp-three-way-88b96e5c","2026-09-13T10:01:05.179293Z",{"title":205,"slug":206,"cover":9,"excerpt":207,"publishTime":208,"categories":209,"tags":210,"priority":41,"pinned":109,"deleted":109,"visible":125,"allowComment":121},"TCP 三次握手过程？","net-tcp-three-way",{"raw":9,"autoGenerate":121},"2026-09-13T10:01:05.250642Z",[101],[],{"permalink":212,"excerpt":213,"lastModifyTime":214,"phase":130},"\u002Farchives\u002Fnet-tcp-three-way","一、过程 第一次：客户端发送 SYN=1, seq=x，进入 SYN_SENT 状态。 第二次：服务端回复 SYN=1, ACK=1, seq=y, ack=x+1，进入 SYN_RCVD 状态。 第三次：客户端回复 ACK=1, seq=x+1, ack=y+1，双方进入 ESTABLISHED ","2026-09-16T09:14:44.609162Z",[216],{"metadata":217,"spec":219,"status":220,"postCount":87},{"name":101,"creationTimestamp":102,"labels":218},{"haloweb.section":104},{"displayName":106,"slug":101,"cover":9,"description":107,"priority":108,"hideFromList":109,"preventParentPostCascadeQuery":109},{"permalink":111,"postCount":87,"visiblePostCount":87},{"metadata":222,"spec":223,"status":227,"categories":228,"content":234},{"name":202,"creationTimestamp":203},{"title":205,"slug":206,"cover":9,"excerpt":224,"publishTime":208,"categories":225,"tags":226,"priority":41,"pinned":109,"deleted":109,"visible":125,"allowComment":121},{"raw":9,"autoGenerate":121},[101],[],{"permalink":212,"excerpt":213,"lastModifyTime":214,"phase":130},[229],{"metadata":230,"spec":232,"status":233,"postCount":87},{"name":101,"creationTimestamp":102,"labels":231},{"haloweb.section":104},{"displayName":106,"slug":101,"cover":9,"description":107,"priority":108,"hideFromList":109,"preventParentPostCascadeQuery":109},{"permalink":111,"postCount":87,"visiblePostCount":87},{"content":235,"raw":235},"\u003Ch2>一、过程\u003C\u002Fh2>\n\u003Col>\n\u003Cli>\u003Cstrong>第一次\u003C\u002Fstrong>：客户端发送 SYN=1, seq=x，进入 SYN_SENT 状态。\u003C\u002Fli>\n\u003Cli>\u003Cstrong>第二次\u003C\u002Fstrong>：服务端回复 SYN=1, ACK=1, seq=y, ack=x+1，进入 SYN_RCVD 状态。\u003C\u002Fli>\n\u003Cli>\u003Cstrong>第三次\u003C\u002Fstrong>：客户端回复 ACK=1, seq=x+1, ack=y+1，双方进入 ESTABLISHED 状态。\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2>二、为什么是三次\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>两次无法确认客户端的接收能力和服务端的发送能力。\u003C\u002Fli>\n\u003Cli>三次是最少能确认双方收发能力都正常的次数。\u003C\u002Fli>\n\u003Cli>防止已失效的连接请求到达服务端导致错误建立连接。\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>三、为什么不是四次\u003C\u002Fh2>\n\u003Cp>服务端的 SYN 和 ACK 可以合并在一次发送，所以三次足够。\u003C\u002Fp>\n\u003Ch2>四、SYN 攻击\u003C\u002Fh2>\n\u003Cp>攻击者发送大量 SYN 但不回 ACK，占满服务端半连接队列。防护：SYN cookies、增大半连接队列、缩短 SYN 超时。\u003C\u002Fp>"]