简杰的网络日志

一起学习,一起进步

Before diving straight into the topic, let’s first look at some of the HTTP/2 terminologies used frequently.

在深入讨论之前,让我们先看下经常使用的一些 HTTP/2 的术语。

  • Stream: An established bidirectional connection which may carry one or more messages

  • Message: A complete sequence of frames that represents a request or response message

  • Frame: The smallest unit of communication in HTTP/2. Each frame contains a frame header which could identify the stream to which the frame belongs.

  • h2: Short term for HTTP/2

  • 流: 已建立的双向连接,可以携带一个或多个消息

  • 消息: 表示请求或响应消息的完整帧序列

  • 帧: HTTP/2 中最小的通信单位。 每个帧包含一个帧头,它可以识别帧所属的流。

  • h2: HTTP/2 的短期

Note: It was originally named as HTTP/2.0 but later “.0” part was dropped because it has caused some confusions with HTTP/1.x. So we no longer use HTTP/2.0, it’s HTTP/2 or h2 for short 😊

注意:

它最初被命名为 HTTP/2.0,但后来“.0”部分被删除,因为它引起了 HTTP/1.x 的一些混淆。 所以我们不再使用 HTTP/2.0,简而言之是 HTTP/2 或 h2

阅读全文 »

说明

表的状态是我们判断业务到达什么地方的标识,它可以是英文单词,也可以是数字,更可以是枚举。在开发的过程中,有人是直接写状态值,这样很不好维护,如果值变更,他就得把程序里关联的值全部都需要修改。

阅读全文 »

QUIC is the protocol underlying the next version of HTTP

QUIC 是下一个版本 HTTP 的基础协议

the Internet Engineering Task Force (IETF) has revealed that the third official version of HyperText Transfer Protocol (HTTP) will not use TCP anymore. Instead, it will run over the QUIC protocol first developed by Google back in 2012.

因特网工程工作组(Internet Engineering Task Force 简称:IETF)透露,第三个官方版本的超文本传输协议(HyperText Transfer Protocol 简称:HTTP)将不再使用 TCP。反而,它将运行 2012 年由谷歌首次开发的 QUIC 协议。

阅读全文 »

起因

第一次爬虫是因为觉得上班不忙,又不想每天玩游戏让自己后悔。所以以锻炼为目的写爬虫。因为自己尿性是没有毅力也很容易放弃的人。所以我选择的内容是抓小网站,让自己的学习不会太过于困难。那时并没有很多开发经验,也没有做所谓的启动准备。都是想到什么就去做什么,也不知道自己这个项目要做到什么程度。

阅读全文 »

题目

判断一个整数是否是回文数。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。

示例 1:

1
2
输入: 121
输出: true

示例 2:

1
2
3
输入: -121
输出: false
解释: 从左向右读, 为 -121 。 从右向左读, 为 121- 。因此它不是一个回文数。

示例 3:

1
2
3
输入: 10
输出: false
解释: 从右向左读, 为 01 。因此它不是一个回文数。
阅读全文 »

Redis, is an open source, widely popular data structure tool that can be used as an in-memory distributed database, message broker or cache. Since it is designed to be accessed inside trusted environments, it should not be exposed on the Internet. However, some Redis’ are bind to public interface and even has no password authentication protection.

Redis是一个开源的、广泛流行的数据结构工具,可以用作内存中的分布式数据库、消息代理或缓存。因为它被设计为在受信任的环境中访问,所以不应该在 Internet 上公开。然而,一些 Redis 绑定到公共接口,甚至没有密码身份验证保护。

阅读全文 »

题目

给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。

示例 1:

1
2
输入: 123
输出: 321

示例 2:

1
2
输入: -123
输出: -321

示例 3:

1
2
输入: 120
输出: 21

注意:

假设我们的环境只能存储得下 32 位的有符号整数,则其数值范围为 [$−2^{31}$, $2^{31}$ − 1]。请根据这个假设,如果反转后整数溢出那么就返回 0。

阅读全文 »
0%