1.什么是IP和TCP? Internet协议(IP)是Internet的地址系统,具有将数据包从源设备传递到目标设备的核心功能。IP是建立网络连接的主要方式,奠定了Internet的基础。IP不负责数据包排序或错误检查。这样的功能需要另一种协议,通常是TCP。 TCP/IP关系类似于通过邮件向某人 ...
分类:
其他好文 时间:
2021-06-04 18:57:39
阅读次数:
0
客户端发送tcp请求给服务端,最终所有服务端的逻辑都存在于服务端的netty中,进一步说就是channelHandler中 public class NettyServerPipelineFactory implements ChannelPipelineFactory { private Nett ...
分类:
其他好文 时间:
2021-06-04 18:49:49
阅读次数:
0
一、自定义全局异常json数据 任何接口都是可能出错,4xx、5xx等 如果业务没有做好统一的错误管理,直接暴露给用户,无疑是看不懂 所以假如后端某个业务出错,Nginx 层也需要进行转换 让前端知道 Http 响应是200,其实是将错误的状态码定向至200,返回了全局兜底数据 location / ...
分类:
其他好文 时间:
2021-06-04 18:44:38
阅读次数:
0
作者:Grey 原文地址:Linux下安装Nginx 版本 Nginx:1.20.1 操作系统:CentOS 7 安装必要工具和依赖 yum -y install wget gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-dev ...
分类:
系统相关 时间:
2021-06-03 18:15:31
阅读次数:
0
使用模块 ngx_http_gzip_module 用gzip方法压缩响应数据,节约带宽 一、启用或禁用gzip压缩 gzip on | off; 二、压缩比由低到高:1 到 9, 默认:1 gzip_comp_level level; 压缩比越高,越消耗CPU 三、匹配到客户端浏览器不执行压缩 g ...
分类:
其他好文 时间:
2021-06-03 18:08:25
阅读次数:
0
* Official English Documentation: http://nginx.org/en/docs/ * Official Russian Documentation: http://nginx.org/ru/docs/ #==基础配置==# user nginx; #设置运行用户 ...
分类:
其他好文 时间:
2021-06-03 18:04:40
阅读次数:
0
问题1:harbor服务不能正常提供? Error response from daemon: Get http://hub.atguigu.com/v2/: dial tcp 192.168.66.100:80: connect: connection refused 原因分析:harbor服务器 ...
分类:
其他好文 时间:
2021-06-03 17:53:13
阅读次数:
0
一、连接数据库: dsn := "root:123456@tcp(127.0.0.1:3306)/more?charset=utf8mb4&parseTime=True&loc=Local" db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{}) ...
分类:
数据库 时间:
2021-06-03 17:50:45
阅读次数:
0
package kuangs.lesson02;import java.io.*;import java.net.ServerSocket;import java.net.Socket;//服务器端public class TcpServerDemo02 { public static void m ...
分类:
Web程序 时间:
2021-06-02 20:24:31
阅读次数:
0
What does it means? For example, if we have setup a API Gateway, REST API, GET method point to a Lambda function with no proxy intergration which retu ...
分类:
移动开发 时间:
2021-06-02 19:55:41
阅读次数:
0