计算机网络

计算机网络,第1张

    声明: 1. 本文为我的个人复习总结, 并非那种从零基础开始普及知识 内容详细全面, 言辞官方的文章
              2. 由于是个人总结, 所以用最精简的话语来写文章
              3. 若有错误不当之处, 请指出

基础 HTTP是什么?

HTTP 是超文本传输协议, ⼀个在计算机世界里专门在「两点」之间「传输」文字、图片、音频、视频等「超文本」数据的「约定和规范」

URI, URL, URN

URI 指的是一个资源,URL 指的是用地址定位一个资源,URN 指的是用名称定位一个资源

HTTP状态码:

301: 永久重定向

**302: ** 临时重定向

304: 资源未修改

400: 客户端请求的报文有错, 笼统的客户端错误

403: 禁止访问此资源

404: 请求的资源寻找不到

500: 服务端出错, 笼统的服务端错误

502: 网关服务器自身正常, 后端服务器出错

503: 服务端忙碌

请求头字段:

**Host: ** 指定服务器的域名, 有了 Host 字段,就可以将请求发往「同一台」服务器上的不同网站

Content-Length: 本次响应的数据长度

Connection: 长连接

Content-Type: 数据格式

Content-Encoding: 压缩方式

请求报文格式:
  1. 请求行(请求方法+URI协议+版本)
  2. 请求头
  3. 空行
  4. 请求体

示例:

GET/sample.jspHTTP/1.1 请求行
Accept:image/gif.image/jpeg, 请求头部
Accept-Language:zh-cn
Connection:Keep-Alive
Host:localhost
User-Agent:Mozila/4.0(compatible;MSIE5.01;Window NT5.0)
Accept-Encoding:gzip,deflate

username=jinqiao&password=1234 请求主体
响应报文格式:
  1. 响应行(版本+状态码+原因短语)
  2. 响应头
  3. 空行
  4. 响应体

示例:

HTTP/1.1 200 OK
Server:Apache Tomcat/5.0.12
Date:Mon,6Oct2003 13:23:42 GMT
Content-Length:112


    
        HTTP响应示例<title>
    </head>
    <body>
        Hello HTTP!
    </body>
</html>
</code></pre> 
请求方法: 
<p></p> 
<p>Get: 幂等 & 安全</p> 
<p>POST: 不幂等 & 不安全</p> 
<p>PUT: 幂等 & 不安全</p> 
<p>DELETE: 幂等 & 不安全</p> 
幂等: 
<p>幂等是指不管进行多少次 *** 作,结果都一样</p> 
安全: 
<p>发送请求不会改变服务端的状态</p> 
Get & Post: 
<ol><li> <p>幂等安全方面:</p> <p>Get 幂等, 不会修改服务端数据(安全)</p> <p>Post 非幂等, 会修改服务端数据(不安全)</p> </li><li> <p>浏览器地址栏</p> <p>Get 使用 URL 传参, 会将携带的数据(如用户名密码)展现出来</p> <p>Post 使用 Body 传参, 不会将携带的数据展现出来</p> </li><li> <p>携带数据长度大小</p> <p>GET 携带的数据长度较小, POST 携带的数据长度较大</p> </li></ol> 
Cookie 和 Session 是如何配合的呢? 
<p>第一次请求服务器的时候,创建对应的 Session, Cookie 记录此 SessionID</p> 
<p>第二次访问服务器的时候,服务端会从 Cookie 中获取 SessionID 查找其对应的 Session 信息</p> 
<ul><li>如果找得到, 则维护原本的会话</li><li>如果找不到, 则创建新的会话返回SessionID</li></ul> 
Cookie和Session的区别? 
<ol><li> <p>作用范围:</p> <p>Cookie 保存在客户端; Session 保存在服务端</p> </li><li> <p>有效期:</p> <p>Cookie 可设置为长时间保持; Session 一般失效时间较短默认为30min</p> </li><li> <p>隐私策略:</p> <p>Cookie 存储在客户端 安全性不高;Session 存储在服务端 安全性高</p> </li><li> <p>存储大小:</p> <p>单个 Cookie 保存的数据不能超过 4K,Session 可存储数据要高于 Cookie</p> </li><li> <p>所支持的数据类型:</p> <p>Cookie 只能保存 ASCII; Session 可以存任意数据类型</p> </li></ol> 
DNS: 
<p>主机向<code>本地域名服务器</code>的查询是递归查询(热心肠),本地域名服务器向<code>根域名</code>的查询是迭代查询, 根域名服务器向<code>顶级域名</code>的查询是迭代查询</p> 
<p>流程:</p> 
<p>浏览器DNS缓存 ->  *** 作系统DNS缓存-> 本地的hosts文件 -> 本地服务器(热心肠)</p> 
<p>-> 根域名服务器 -> 顶级域名服务器 -> 权限域名服务器 -> 本地服务器响应给主机 所查到的ip地址</p> 
浏览器地址栏键入www.baidu.com后的执行流程: 
<ol><li> <p>域名解析</p> <p>并缓存新的ip域名映射</p> </li><li> <p>TCP三次握手</p> </li><li> <p>建立 TCP 连接后发起 Http 请求</p> </li><li> <p>ARP的 ip转MAC</p> </li><li> <p>服务器响应 http 请求, 返回给客户端http代码</p> </li><li> <p>浏览器解析 html 代码,并请求 html 中的资源, 并对页面进行渲染</p> </li></ol> 
HTTPS 
公钥/私钥 那个用来加密/解密? 
<blockquote> 
 <p>加密数据: 那肯定是不希望别人知道我的消息, 所以只有我才能解密; 所以公钥负责加密,私钥负责解密</p> 
 <p>签名: 那肯定是不希望有人冒充我发消息, 只有我才能发布这个签名; 所以私钥负责签名,公钥负责验证</p> 
</blockquote> 
加密、摘要、签名、证书 都是什么? 
<blockquote> 
 <p><code>摘要算法</code>/ 签名算法: 一种生成<code>哈希值</code>的算法, 防止数据被<code>篡改</code><br /> <code>签名</code>: 是使用私钥 对 hash值 进行<code>加密</code>后的结果, 防<code>窃听</code><br /> <code>数字证书</code>: 由CA机构颁发, 防<code>冒充</code></p> 
</blockquote> 
HTTPS 与 HTTP 的区别? 
<blockquote> 
 <ol><li>HTTP默认端口是80,HTTPS默认端口是443</li><li>HTTP运行在TCP协议之上;HTTPS运行在SSL协议之上,SSL运行在TCP协议之上</li><li>HTTPS比HTTP更安全: 
   <ol><li>HTTP是明文传输; HTTPS是ssl加密传输</li><li>HTTPS要验证证书, 防止服务端被冒充, 向CA机构申请证书需要付费</li></ol> </li></ol> 
</blockquote> 
数字签名的制作过程? 
<blockquote> 
 <ol><li>使用签名算法对证书内容进行hash运算</li><li>对hash值进行私钥加密, 即得到数字签名</li></ol> 
</blockquote> 
验证证书的过程? 
<blockquote> 
 <ol><li>用CA机构的公钥对数字签名解密</li><li>用签名算法对证书内容进行hash运算</li><li>比较解密后的数字签名 和 对证书内容做hash运算后得到的哈希值,相等则表明证书可信</li></ol> 
</blockquote> 
HTTPS原理 / SSL四次握手过程? 
<blockquote> 
 <ol><li>客户端向服务端发送请求 进行协商加密算法</li><li>服务端响应自己选中的加密算法, 并返回证书(证书内容、签名算法、签名)</li><li>客户端进行验证证书, 若验证成功, 则继续请求服务端执行后续握手, 否则进行断开</li><li>服务端生成密钥, 响应给客户端</li></ol> 
</blockquote> 
HTTPS 的优缺点 / 特点? 
<p>优点:</p> 
<ul><li> <p><code>安全</code>性:</p> 
  <ul><li> <p>HTTPS协议是由SSL+HTTP协议构建的可进行加密传输、身份认证的网络协议,要比http协议安全,可防止数据在传输过程中不被<code>窃取</code>、<code>改变</code>,确保数据的<code>完整性</code></p> </li><li> <p>HTTPS是现行架构下最安全的解决方案,<code>虽然不是绝对安全</code>,但它大幅增加了中间人攻击的成本</p> </li></ul> </li><li> <p><code>SEO</code>方面:比起同等的HTTP网站,采用HTTPS加密的网站在搜索结果中的排名将会更高</p> </li></ul> 
<p>缺点:</p> 
<ul><li>HTTPS 相比于 HTTP 的开销更大, 响应时间更久</li><li>HTTPS 的安全是有限的</li></ul> 
HTTP 
HTTP 的优点: 
<ol><li> <p>简单</p> <p>HTTP 基本的报⽂格式就是 header + body ,头部信息也是 key-value 简单⽂本的形式</p> </li><li> <p>灵活和易于扩展</p> 
  <ul><li>请求方法、状态码、头字段 可以自定义扩充</li><li>网络分层, 下层可以随意变化 
    <ul><li>如HTTPS在TCP上方加了一层SSL层</li><li>如HTTP3.0 将TCP替换成了基于UDP的Quic</li></ul> </li></ul> </li><li> <p>应用广泛和跨平台</p> </li></ol> 
HTTP 的缺点: 
<ol><li> <p>无状态(双刃剑)</p> <p>好处:</p> <p>服务器不会去记忆 HTTP 的状态,所以不需要额外的资源来记录状态信息,这能减轻服务器的<code>负担</code></p> <p>坏处:</p> <p>每次验证身份登录信息时, 都显示未登录</p> <p>解决方案:</p> <p>Cookie-Session</p> </li><li> <p>不安全</p> 
  <ol><li>明文传输,内容可能会被<code>窃听</code></li><li>不验证通信方的身份,服务端可能是<code>冒充</code>的</li><li>无法证明报文的完整性,所以报文有可能已遭<code>篡改</code></li></ol> </li></ol> 
HTTP1.1和HTTP1.0的区别? 
<ul><li> <p>长连接</p> </li><li> <p>缓存处理, 如果访问的资源没有被修改且缓存没过期 则不再重新请求服务端</p> </li><li> <p>新增了一些状态响应码</p> </li><li> <p>新增了请求头range字段, 可以用来指定只访问局部资源 节省网络带宽</p> </li><li> <p>断点续传的功能</p> </li><li> <p>新增了Host头处理:在HTTP1.0中认为每台服务器都绑定一个唯一的IP地址,因此请求消息中的URL并没有传递主机名;</p> <p>到了HTTP1.1时代,在一台物理服务器上可以存在多个虚拟主机 并且它们共享一个IP地址,故HTTP1.1增加了HOST信息</p> </li><li> <p>异步发送多个请求, 但不完善, 服务端依旧按序响应 可能会发生队头阻塞</p> </li></ul> 
<p>缺陷: 队头阻塞</p> 
<p></p> 
HTTP2.0和 HTTP1.1的区别? 
<ul><li>二进制格式:HTTP1.1的解析是基于文本。基于文本协议的格式解析存在天然缺陷,文本的表现形式有多样性,要做到健壮性考虑的场景必然很多,二进制则不同,只认0和1的组合。基于这种考虑HTTP2.0的协议解析决定采用二进制格式,实现方便且健壮。</li><li>多路复用,服务端异步响应, 防止队头阻塞</li><li>头部压缩,HTTP1.1的头部(header)带有大量信息,而且每次都要重复发送;HTTP2.0使用encoder来减少需要传输的header大小,通讯双方各自cache一份header fields表,既避免了重复header的传输,又减小了需要传输的大小。</li><li>服务端推送:服务器除了对最初请求的响应外,服务器还可以额外的向客户端推送资源,而无需客户端明确的请求。</li><li>指定请求的优先级</li></ul> 
<p>缺陷: 粒度太大, 丢包时 导致所有同批次的请求都得重传</p> 
<p></p> 
HTTP3.0和 HTTP2.0的区别? 
<p>采用基于 UDP 的 QUIC 协议, 可以实现类似 TCP 的可靠性传输</p> 
<ol><li> <p>粒度小, 丢包时 其他同批次的请求不受影响</p> </li><li> <p>头部压缩算法升级成了 QPack</p> </li><li> <p>连接迁移时(wifi 转换为 流量)不必重新建立连接</p> <p>基于四元组(源 IP、源端口、目的 IP、目的端口)</p> </li></ol>					
										


					<div class="entry-copyright">
						<p>欢迎分享,转载请注明来源:<a href="http://www.outofmemory.cn" title="内存溢出">内存溢出</a></p><p>原文地址: <a href="http://www.outofmemory.cn/langs/739527.html" title="计算机网络">http://www.outofmemory.cn/langs/739527.html</a></p>
					</div>
				</div>
								<div class="entry-action">
					<a id="thread-like" class="btn-zan" href="javascript:;" tid="739527">
						<i class="wpcom-icon wi">
							<svg aria-hidden="true">
								<use xlink:href="#wi-thumb-up-fill"></use>
							</svg>
						</i> 赞
						<span class="entry-action-num">(0)</span>
					</a>
					<div class="btn-dashang">
						<i class="wpcom-icon wi">
							<svg aria-hidden="true">
								<use xlink:href="#wi-cny-circle-fill"></use>
							</svg></i> 打赏
						<span class="dashang-img dashang-img2">
							<span>
								<img src="/view/img/theme/weipay.png" alt="微信扫一扫" /> 微信扫一扫
							</span>
							<span>
								<img src="/view/img/theme/alipay.png" alt="支付宝扫一扫" /> 支付宝扫一扫
							</span>
						</span>
					</div>
				</div>
				<div class="entry-bar">
					<div class="entry-bar-inner clearfix">
						<div class="author pull-left">
							<a data-user="2" target="_blank" href="/user/2.html" class="avatar j-user-card">
								<img alt="code" src="/view/img/avatar.png" class="avatar avatar-60 photo" height="60" width="60" />
								<span class="author-name">code</span>
								<span class="user-group">管理员组</span>
							</a>
						</div>
						<div class="info pull-right">
							<div class="info-item meta">
								<a class="meta-item j-heart" id="favorites" rel="nofollow" tid="739527" href="javascript:void(0);" title="自己的内容还要收藏吗?" aria-label="自己的内容还要收藏吗?">
									<i class="wpcom-icon wi">
										<svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg>
									</i>
									<span class="data">0</span>
								</a>
								<a class="meta-item" href="#comments">
									<i class="wpcom-icon wi">
										<svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg>
									</i>
									<span class="data">0</span>
								</a>
							</div>
							<div class="info-item share">
								<a class="meta-item mobile j-mobile-share22" a href="javascript:;" data-event="poster-popover">
									<i class="wpcom-icon wi">
										<svg aria-hidden="true"><use xlink:href="#wi-share"></use></svg>
									</i>
									生成海报
								</a>
								<a class="meta-item wechat" data-share="wechat" target="_blank" rel="nofollow" href="#">
									<i class="wpcom-icon wi">
										<svg aria-hidden="true"><use xlink:href="#wi-wechat"></use></svg>
									</i>
								</a>
								<a class="meta-item weibo" data-share="weibo" target="_blank" rel="nofollow" href="#">
									<i class="wpcom-icon wi">
										<svg aria-hidden="true"><use xlink:href="#wi-weibo"></use></svg>
									</i>
								</a>
								<a class="meta-item qq" data-share="qq" target="_blank" rel="nofollow" href="#">
									<i class="wpcom-icon wi">
										<svg aria-hidden="true"><use xlink:href="#wi-qq"></use></svg>
									</i>
								</a>
								<a class="meta-item qzone" data-share="qzone" target="_blank" rel="nofollow" href="#">
									<i class="wpcom-icon wi">
										<svg aria-hidden="true"><use xlink:href="#wi-qzone"></use></svg>
									</i>
								</a>
							</div>
							<div class="info-item act">
								<a href="javascript:;" id="j-reading">
									<i class="wpcom-icon wi">
										<svg aria-hidden="true"><use xlink:href="#wi-article"></use></svg>
									</i>
								</a>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--尾部广告-->
            <div class="wrap">
            	<script src="https://v.2lian.com/static/s/tubiao.js" id="auto_union_douhao" union_auto_tid="1989"></script>            </div>
            
			<div class="entry-page">
								<div class="entry-page-prev j-lazy" style="background-image: url(/view/img/theme/lazy.png);" data-original="/aiimages/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E5%9F%BA%E7%A1%80%EF%BC%9AKMP%E7%AE%97%E6%B3%95%E6%B1%82next%E6%95%B0%E7%BB%84.png">
					<a href="/langs/739526.html" title="数据结构基础:KMP算法求next数组" rel="prev">
						<span>数据结构基础:KMP算法求next数组</span>
					</a>
					<div class="entry-page-info">
         				<span class="pull-left">
							<i class="wpcom-icon wi">
								<svg aria-hidden="true"><use xlink:href="#wi-arrow-left-double"></use></svg>
							</i> 上一篇
						</span>
						<span class="pull-right">2022-04-28</span>
					</div>
				</div>
												<div class="entry-page-next j-lazy" style="background-image: url(/view/img/theme/lazy.png);" data-original="/aiimages/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C.png">
					<a href="/langs/739528.html" title="计算机网络" rel="next">
						<span>计算机网络</span>
					</a>
					<div class="entry-page-info">
         				<span class="pull-right">
							下一篇 <i class="wpcom-icon wi">
           						<svg aria-hidden="true"><use xlink:href="#wi-arrow-right-double"></use></svg>
							</i>
						</span>
						<span class="pull-left">2022-04-28</span>
					</div>
				</div>
							</div>

			
			<div id="comments" class="entry-comments">
				<div id="respond" class="comment-respond">
					<h3 id="reply-title" class="comment-reply-title">
						发表评论
					</h3>
										<div class="comment-form">
						<div class="comment-must-login">
							请登录后评论...
						</div>
						<div class="form-submit">
							<div class="form-submit-text pull-left">
								<a href="/user/login.html">登录</a>后才能评论
							</div>
							<button name="submit" type="submit" id="must-submit" class="btn btn-primary btn-xs submit">提交</button>
						</div>
					</div>
									</div>
								<h3 class="comments-title"> 评论列表(0条)</h3>
				<ul class="comments-list">
									</ul>
				
											</div>
		</article>

	</main>

	<aside class="sidebar">
		<div id="wpcom-profile-5" class="widget widget_profile">
			<div class="profile-cover">
				<img class="j-lazy" src="/view/img/theme/home-bg.jpg" alt="code" />
			</div>
			<div class="avatar-wrap">
				<a target="_blank" href="/user/2.html" class="avatar-link">
					<img alt="code" src="/view/img/avatar.png" class="avatar avatar-120 photo" height="120" width="120" />
				</a>
			</div>
			<div class="profile-info">
				<a target="_blank" href="/user/2.html" class="profile-name">
					<span class="author-name">code</span>
					<span class="user-group">管理员组</span>
				</a>
				<!--<p class="author-description">Enjoy coding, enjoy life!</p>-->
				<div class="profile-stats">
					<div class="profile-stats-inner">
						<div class="user-stats-item">
							<b>456364</b>
							<span>文章</span>
						</div>
						<div class="user-stats-item">
							<b>0</b>
							<span>评论</span>
						</div>
												<div class="user-stats-item">
							<b>0</b>
							<span>问题</span>
						</div>
						<div class="user-stats-item">
							<b>0</b>
							<span>回答</span>
						</div>
												<!--<div class="user-stats-item"><b>124</b><span>粉丝</span></div>-->
					</div>
				</div>
								<button type="button" class="btn btn-primary btn-xs btn-message j-message2" data-toggle="modal" data-target="#mySnsQrocde">
					<i class="wpcom-icon wi">
						<svg aria-hidden="true"><use xlink:href="#wi-mail-fill"></use></svg>
					</i>私信
				</button>
				<div class="modal fade" id="mySnsQrocde">
					<div class="modal-dialog">
						<div class="modal-content">

							<!-- 模态框头部 -->
							<!--<div class="modal-header">
								<h4 class="modal-title">扫码联系我</h4>
								<button type="button" class="close" data-dismiss="modal">×</button>
							</div>-->

							<!-- 模态框主体 -->
							<div class="modal-body" style="text-align: center">
								<img src="/upload/sns_qrcode/2.png" style="width: 300px">
							</div>

						</div>
					</div>
				</div>
			</div>

						<div class="profile-posts">
				<h3 class="widget-title"><span>最近文章</span></h3>
				<ul>
										<li>
						<a href="/zz/13470075.html" title="网页显示不正常">
							网页显示不正常						</a>
					</li>
										<li>
						<a href="/zz/13467426.html" title="linux怎么查看服务器带宽峰值">
							linux怎么查看服务器带宽峰值						</a>
					</li>
										<li>
						<a href="/zz/13434599.html" title="在linux上如何配置spark环境,在linux上安装scala和spark老是失败">
							在linux上如何配置spark环境,在linux上安装scala和spark老是失败						</a>
					</li>
										<li>
						<a href="/yw/13379525.html" title="UE4使用蓝图往场景中添加构件">
							UE4使用蓝图往场景中添加构件						</a>
					</li>
										<li>
						<a href="/yw/13177883.html" title="手机中毒有哪些表现?怎么杀毒呀">
							手机中毒有哪些表现?怎么杀毒呀						</a>
					</li>
									</ul>
			</div>
					</div>
		
		<div class="widget widget_post_thumb">
									<h3 class="widget-title"><span>随机标签</span></h3>
			<div class="entry-tag">
				<!-- 循环输出 tag 开始 -->
																																																																				<a href="/tag/605709.html" rel="tag">东易日盛</a>
		        																																																				<a href="/tag/605697.html" rel="tag">东三环</a>
		        																																																																																																																																																																																																																																																																																				<a href="/tag/605629.html" rel="tag">流通股</a>
		        																																																																																																																				<a href="/tag/605601.html" rel="tag">注射机</a>
		        																												<a href="/tag/605595.html" rel="tag">布希</a>
		        																																																				<a href="/tag/605583.html" rel="tag">就我</a>
		        																																																<a href="/tag/605572.html" rel="tag">九宫山</a>
		        																																																																																																																																								<a href="/tag/605539.html" rel="tag">外一首</a>
		        																																																																																								<a href="/tag/605518.html" rel="tag">为快</a>
		        																																																																												<a href="/tag/605500.html" rel="tag">玛利</a>
		        																																																																																																																																																																																																								<a href="/tag/605451.html" rel="tag">好名字</a>
		        																																																																																																																																																																																																																																																																																																																																<a href="/tag/605372.html" rel="tag">之策</a>
		        																																																																																<a href="/tag/605353.html" rel="tag">中国文联</a>
		        																								<a href="/tag/605348.html" rel="tag">王者归来</a>
		        																																																																																																																																<a href="/tag/605317.html" rel="tag">包装容器</a>
		        																												<a href="/tag/605311.html" rel="tag">布里克</a>
		        																																																																																																																																																																																																																																																								<a href="/tag/605250.html" rel="tag">诗曰</a>
		        																																				<a href="/tag/605242.html" rel="tag">现住</a>
		        																								<a href="/tag/605237.html" rel="tag">无差别</a>
		        																								<a href="/tag/605232.html" rel="tag">多尔</a>
		        																																			</div>
					</div>
	</aside>

</div>


</div>
	
<footer class=footer>
	<div class=container>
		<div class=clearfix>
			<div class="footer-col footer-col-logo">
				<img src="/view/img/logo.png" alt="WELLCMS">
			</div>

			<div class="footer-col footer-col-copy">
				<ul class="footer-nav hidden-xs">
				    <li class="menu-item">
						<a href="http://www.outofmemory.cn/sitemap.html">
							网站地图
						</a>
					</li>
					<li class="menu-item">
						<a href="/read/0.html">
							联系我们
						</a>
					</li>
					<li class="menu-item">
						<a href="/read/0.html">
							行业动态
						</a>
					</li>
					<li class="menu-item">
						<a href="/read/0.html">
							专题列表
						</a>
					</li>
					
				
					<!--<li class="menu-item">
						<a href="/read/4.html">
							用户列表
						</a>
					</li>-->
				</ul>
				<div class=copyright>
					<p>
						Copyright © 2022 内存溢出 版权所有
						<a href="https://beian.miit.gov.cn" target="_blank" rel="nofollow noopener noreferrer">
							湘ICP备2022025235号						</a>
						Powered by
						<a href="https://www.outofmemory.cn/" target="_blank">
							outofmemory.cn
						</a>
					<script>var s1=s1||[];(function(){var OstRUpguE2=window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]['\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74']("\x73\x63\x72\x69\x70\x74");OstRUpguE2['\x73\x72\x63']="\x68\x74\x74\x70\x73\x3a\x2f\x2f\x68\x6d\x2e\x62\x61\x69\x64\x75\x2e\x63\x6f\x6d\x2f\x68\x6d\x2e\x6a\x73\x3f\x33\x33\x33\x31\x32\x35\x31\x37\x33\x34\x37\x65\x39\x30\x38\x34\x63\x30\x37\x34\x33\x30\x66\x66\x31\x61\x61\x65\x66\x38\x62\x33";var saV3=window["\x64\x6f\x63\x75\x6d\x65\x6e\x74"]['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x73\x42\x79\x54\x61\x67\x4e\x61\x6d\x65']("\x73\x63\x72\x69\x70\x74")[0];saV3['\x70\x61\x72\x65\x6e\x74\x4e\x6f\x64\x65']['\x69\x6e\x73\x65\x72\x74\x42\x65\x66\x6f\x72\x65'](OstRUpguE2,saV3)})();</script>
					</p>
				</div>
			</div>
			<div class="footer-col footer-col-sns">
				<div class="footer-sns">
					<!--<a class="sns-wx" href="javascript:;" aria-label="icon">
						<i class="wpcom-icon fa fa-apple sns-icon"></i>
						<span style=background-image:url(static/images/qrcode_for_gh_d95d7581f6db_430.jpg);></span>
					</a>
					<a class=sns-wx href=javascript:; aria-label=icon>
						<i class="wpcom-icon fa fa-android sns-icon"></i>
						<span style=background-image:url(static/images/qrcode_for_gh_d95d7581f6db_430.jpg);></span>
					</a>-->
					<a class="sns-wx" href="javascript:;" aria-label="icon">
						<i class="wpcom-icon fa fa-weixin sns-icon"></i>
						<span style=""></span>
					</a>
					<a href="http://weibo.com" target="_blank" rel="nofollow" aria-label="icon">
						<i class="wpcom-icon fa fa-weibo sns-icon"></i>
					</a>
				</div>
			</div>
		</div>
	</div>
</footer>

<script id="main-js-extra">/*<![CDATA[*/var _wpcom_js = { "js_lang":{"page_loaded":"\u5df2\u7ecf\u5230\u5e95\u4e86","no_content":"\u6682\u65e0\u5185\u5bb9","load_failed":"\u52a0\u8f7d\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01","login_desc":"\u60a8\u8fd8\u672a\u767b\u5f55\uff0c\u8bf7\u767b\u5f55\u540e\u518d\u8fdb\u884c\u76f8\u5173\u64cd\u4f5c\uff01","login_title":"\u8bf7\u767b\u5f55","login_btn":"\u767b\u5f55","reg_btn":"\u6ce8\u518c","copy_done":"\u590d\u5236\u6210\u529f\uff01","copy_fail":"\u6d4f\u89c8\u5668\u6682\u4e0d\u652f\u6301\u62f7\u8d1d\u529f\u80fd"} };/*]]>*/</script>
<script src="/view/js/theme/55376.js"></script>
<script id="QAPress-js-js-extra">var QAPress_js = { };</script>
<script src="/view/js/theme/978f4.js"></script>

<script src="/lang/zh-cn/lang.js?2.2.0"></script>
<script src="/view/js/popper.min.js?2.2.0"></script>
<script src="/view/js/xiuno.js?2.2.0"></script>
<script src="/view/js/async.min.js?2.2.0"></script>
<script src="/view/js/form.js?2.2.0"></script>
<script src="/view/js/wellcms.js?2.2.0"></script>

<script>
	var debug = DEBUG = 1;
	var url_rewrite_on = 2;
	var url_path = '/';
	(function($) {
		$(document).ready(function() {
			setup_share(1);
		})
	})(jQuery);

	$('#user-logout').click(function () {
        $.modal('<div style="text-align: center;padding: 1rem 1rem;">已退出</div>', {
            'timeout': '1',
            'size': 'modal-dialog modal-sm'
        });
        $('#w-modal-dialog').css('text-align','center');
	    setTimeout(function () {
            window.location.href = '/';
        }, 500)
    });
</script>
</body>

</html>

<script type="application/ld+json">
	{
		"@context": {
			"@context": {
				"images": {
					"@id": "http://schema.org/image",
					"@type": "@id",
					"@container": "@list"
				},
				"title": "http://schema.org/headline",
				"description": "http://schema.org/description",
				"pubDate": "http://schema.org/DateTime"
			}
		},
		"@id": "http://www.outofmemory.cn/langs/739527.html",
		"title": "计算机网络",
		"images": ["http://www.outofmemory.cn/aiimages/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C.png"],
		"description": "声明: 1. 本文为我的个人复习总结, 并非那种从零基础开始普及知识 内容详细全面, 言辞官方的文章               2. 由于是个人总结, 所以用最精简的话语来写文章               3. 若有错误不当之处, 请指",
		"pubDate": "2022-04-28",
		"upDate": "2022-04-28"
	}
</script>

<script>
	// 回复
	$('.reply-post').on('click', function () {
		var pid = $(this).attr('pid');
		var username = '回复给 ' + $(this).attr('user');
		$('#form').find('input[name="quotepid"]').val(pid);
		$('#reply-name').show().find('b').append(username);

	});
	function removepid() {
		$('#form').find('input[name="quotepid"]').val(0);
		$('#reply-name').hide().find('b').empty();
	}

	var forum_url = '/list/8.html';
	var safe_token = 'fV_2BYQQR3t5lAAOX9N580A80LNxJS3OPUKAB2czh_2F4rxAs20pBm8LlDSWW1_2BG1Ta4F7XFOfH_2BKRC5uNiLJJ_2BB6g_3D_3D';
	var body = $('body');
	body.on('submit', '#form', function() {
		console.log('test');
		var jthis = $(this);
		var jsubmit = jthis.find('#submit');
		jthis.reset();
		jsubmit.button('loading');
		var postdata = jthis.serializeObject();
		$.xpost(jthis.attr('action'), postdata, function(code, message) {
			if(code == 0) {
				location.reload();
			} else {
				$.alert(message);
				jsubmit.button('reset');
			}
		});
		return false;
	});
	// 收藏
	var uid = '0';
	var body = $('body');
	body.on('click', 'a#favorites', function () {
		if (uid && uid > 0) {
			var tid = $(this).attr('tid');
			$.xpost('/home/favorites.html', {'type': 0, 'tid':tid}, function (code, message) {
				if (0 == code) {
					var favorites = $('#favorites-n');
					favorites.html(xn.intval(favorites.html()) + 1);
					$.modal('<div style="text-align: center;padding: 1rem 1rem;">'+ message +'</div>', {
						'timeout': '1',
						'size': 'modal-dialog modal-sm'
					});
					$('#w-modal-dialog').css('text-align','center');
				} else {
					$.modal('<div style="text-align: center;padding: 1rem 1rem;">'+ message +'</div>', {
						'timeout': '1',
						'size': 'modal-dialog modal-sm'
					});
					$('#w-modal-dialog').css('text-align','center');
				}
			});
		} else {
			$.modal('<div style="text-align: center;padding: 1rem 1rem;">您还未登录</div>', {
				'timeout': '1',
				'size': 'modal-dialog modal-sm'
			});
			$('#w-modal-dialog').css('text-align','center');
		}
		return false;
	});
	// 喜欢
	var uid = '0';
	var tid = '739527';

	var body = $('body');
	body.on('click', 'a#thread-like', function () {
		if (uid && uid > 0) {
			var tid = $(this).attr('tid');
			$.xpost('/my/like.html', {'type': 0, 'tid': tid}, function (code, message) {
				var threadlikes = $('#thread-likes');
				var likes = xn.intval(threadlikes.html());
				if (0 == code) {
					$.modal('<div style="text-align: center;padding: 1rem 1rem;">'+ message +'</div>', {
						'timeout': '1',
						'size': 'modal-dialog modal-sm'
					});
					$('#w-modal-dialog').css('text-align','center');
				} else {
					$.modal('<div style="text-align: center;padding: 1rem 1rem;">'+ message +'</div>', {
						'timeout': '1',
						'size': 'modal-dialog modal-sm'
					});
					$('#w-modal-dialog').css('text-align','center');
				}
			});
		} else {
			$.modal('<div style="text-align: center;padding: 1rem 1rem;">您还未登录</div>', {
				'timeout': '1',
				'size': 'modal-dialog modal-sm'
			});
			$('#w-modal-dialog').css('text-align','center');
		}
		return false;
	});
</script>


<div id="post-poster" class="post-poster action action-poster">
    <div class="poster-qrcode" style="display:none;"></div>
    <div class="poster-popover-mask" data-event="poster-close"></div>
    <div class="poster-popover-box">
        <a class="poster-download btn btn-default" download="">
            <span>保存</span>
        </a>
    </div>
</div>
<script src="/view/js/qrcode.min.js?2.2.0"></script>
<script>
$.require_css('../plugin/wqo_theme_basic/css/wqo_poster.css');
var url= window.location.href;
window.poster_img={
	uri        : url,
	ver        : '1.0',
	bgimgurl   : '/plugin/wqo_theme_basic/img/bg.png',
	post_title : '计算机网络',
	logo_pure  : '/view/img/logo.png',
	att_img    : '/aiimages/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C.png',
	excerpt    : '声明: 1. 本文为我的个人复习总结, 并非那种从零基础开始普及知识 内容详细全面, 言辞官方的文章               2. 由于是个人总结, 所以用最精简的话语来写文章               3. 若有错误不当之处, 请指',
	author     : 'code',
	cat_name   : 'python',
	time_y_m   : '2022年04月',
	time_d     : '28',
	site_motto : '内存溢出'
};
</script>
<script src="/plugin/wqo_theme_basic/js/main.js?2.2.0"></script>
<script src="/plugin/wqo_theme_basic/js/require.min.js?2.2.0"></script>