上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 70 下一页
摘要: net/http 中同时包好了 HTTP 客户端和服务端的实现,为了支持更好的扩展性,它引入了 net/http.RoundTripper 和 net/http.Handler 两个接口。net/http.RoundTripper 是用来表示执行 HTTP 请求的接口,调用方将请求作为参数可以获取请 阅读全文
posted @ 2024-01-21 15:24 codestacklinuxer 阅读(141) 评论(0) 推荐(0)
摘要: 目前知道gin是基于net/http进一步封装,来看下net/http是怎样写web的 package main import ( "fmt" "net/http" ) func index(w http.ResponseWriter, r *http.Request) { fmt.Fprintln 阅读全文
posted @ 2024-01-20 21:27 codestacklinuxer 阅读(72) 评论(0) 推荐(0)
摘要: package main import ( "net/http" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() r.GET("/", func(c *gin.Context) { c.String(200, "Hello! 阅读全文
posted @ 2024-01-20 17:53 codestacklinuxer 阅读(82) 评论(0) 推荐(0)
摘要: 切换了一下go env -w GOPROXY="https://goproxy.cn,direct" proxy go mod tidy 就好了 可能是aliyun代理上缺少什么东西把 !!!!!!!!!!!! 阅读全文
posted @ 2024-01-19 23:26 codestacklinuxer 阅读(367) 评论(0) 推荐(0)
摘要: TCP Tail Loss Probe(TLP) Early Retransmit机制解决了dupack较少,无法触发快速重传的问题。但是如果发生了尾丢包,由于尾包后面没有更多的数据包,也就没有办法触发任何的dupack。为解决这种尾丢包的问题,Google的几位大神提出了TLP算法。通过TLP算法 阅读全文
posted @ 2024-01-18 19:24 codestacklinuxer 阅读(201) 评论(0) 推荐(0)
摘要: UDP 在多网卡的情况下,可能会发生服务器端回复报文源地址不对的情况。目前这种情况在portal 对接ac的时候经常出现 所以问题就是:需要保存本次udp 请求的local ip remote ip IP_PKTINFO 这个选项就是让内核在 socket 中保存 IP 报文的信息,当然也包括了报文 阅读全文
posted @ 2024-01-17 15:17 codestacklinuxer 阅读(637) 评论(0) 推荐(0)
摘要: Macvlan vs Bridge The macvlan is a trivial bridge that doesn’t need to do learning as it knows every mac address it can receive, so it doesn’t need to 阅读全文
posted @ 2024-01-17 11:34 codestacklinuxer 阅读(40) 评论(0) 推荐(0)
摘要: 目前在写radius 相关c代码的时候,整理了一份基本逻辑 1、初始化log,读取系统配置文件, message sql_gorm { required uint32 db_count = 1[default=10]; required uint32 db_point = 2[default=2]; 阅读全文
posted @ 2024-01-14 20:09 codestacklinuxer 阅读(19) 评论(0) 推荐(0)
摘要: 之前浏览protobuf-c相关代码的时候,根据如下 protobuf_c_message_pack protobuf_c_message_pack_to_bufferprotobuf_c_message_unpack protobuf_c_message_free_unpacked 函数的实现,写 阅读全文
posted @ 2024-01-14 19:38 codestacklinuxer 阅读(17) 评论(0) 推荐(0)
摘要: 客户端: 接收配置的conn 也就是客户端监听8888端口收集config_client配置,重新封装送到隧道里面去 服务端: 将客户端8888 配置转发到server端8877 解封装。然后对比每个配置文件版本号。 如果版本不一样。server 重新封装配置。下发到客户端的8888.,客户端888 阅读全文
posted @ 2024-01-09 21:43 codestacklinuxer 阅读(27) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 70 下一页