<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>learn | OKHK 👀</title><description>(⁠◔⁠‿⁠◔⁠) Are you OK？✨ Thinking...</description><link>http://tg.okhk.net</link><item><title>#learn #cpp Redis 作者展示 </title><link>http://tg.okhk.net/posts/1573</link><guid isPermaLink="true">http://tg.okhk.net/posts/1573</guid><pubDate>Mon, 05 Aug 2024 07:32:02 GMT</pubDate><content:encoded>&lt;div class=&quot;tgme_widget_message_forwarded_from accent_color&quot;&gt;Forwarded from &lt;a class=&quot;tgme_widget_message_forwarded_from_name&quot; href=&quot;https://t.me/dsuse/19837&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span&gt;duangsuse::Echo&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;/search/result?q=%23learn&quot; title=&quot;#learn&quot;&gt;#learn&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23cpp&quot; title=&quot;#cpp&quot;&gt;#cpp&lt;/a&gt; Redis 作者展示 &lt;a href=&quot;https://yabzhang.github.io/posts/project/reading_smallchat/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://yabzhang.github.io/posts/project/reading_smallchat/&quot;&gt;https://yabzhang.github.io/posts/project/reading_smallchat/&lt;/a&gt;&lt;br /&gt;作为一个展示样例，这端代码展示了如何处理内存管理、网络套接字的使用、多路复用、客户端连接的管理、消息和指令的处理等逻辑。除去注释只有短短两百多行，用来学习和理解服务端编程已经足够了 ———— 麻雀虽小五脏俱全。&lt;br /&gt;&lt;br /&gt;&amp;gt;晚上逛 Github 发现个好用的项目(替代sftp分发)，可以用于传输文本和二进制流，支持 curl 和浏览器端，可选 E2EE，支持自建中转服务器，用于在几台服务器之间临时传文件很方便&lt;br /&gt;&lt;a href=&quot;https://github.com/nwtgck/piping-server&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://github.com/nwtgck/piping-server&quot;&gt;https://github.com/nwtgck/piping-server&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;/search/result?q=%23cg&quot; title=&quot;#cg&quot;&gt;#cg&lt;/a&gt; &lt;a href=&quot;https://swiftcafe.io/2016/10/29/pdf&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://swiftcafe.io/2016/10/29/pdf&quot;&gt;https://swiftcafe.io/2016/10/29/pdf&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://github.com/Losses/pdf-postprocess&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://github.com/Losses/pdf-postprocess&quot;&gt;https://github.com/Losses/pdf-postprocess&lt;/a&gt; &lt;br /&gt;用 headless chromium 把 svg 转成 pdf，这样样式就全都对了。&lt;br /&gt;Typst 编译到 PDF 就是走的 svg，谁愿意写 postscript&lt;a class=&quot;tgme_widget_message_link_preview&quot; href=&quot;https://yabzhang.github.io/posts/project/reading_smallchat&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;smallchat1 是 redis 作者 antirez 所写的一个聊天室的小程序；代码短小精悍，很有意思。据说作者以此例向前端朋友展示系统编程的趣味 😄 2~这里记录下阅读源码所获。首先从 main 开始:/* The main() function implements the main chat logic: * 1. Accept new clients connections if any. * 2. Check if any client sent us some new message.…&quot;&gt;
  
  &lt;div class=&quot;link_preview_site_name accent_color&quot;&gt;yabzhang.github.io&lt;/div&gt;
  
  &lt;div class=&quot;link_preview_title&quot;&gt;smallchat 源码阅读&lt;/div&gt;
  &lt;div class=&quot;link_preview_description&quot;&gt;smallchat1 是 redis 作者 antirez 所写的一个聊天室的小程序；代码短小精悍，很有意思。据说作者以此例向前端朋友展示系统编程的趣味 &lt;i class=&quot;emoji&quot; style=&quot;background-image:url(&apos;//telegram.org/img/emoji/40/F09F9884.png&apos;)&quot;&gt;&lt;b&gt;😄&lt;/b&gt;&lt;/i&gt; 2~&lt;br /&gt;这里记录下阅读源码所获。&lt;br /&gt;首先从 main 开始:&lt;br /&gt;/* The main() function implements the main chat logic: * 1. Accept new clients connections if any. * 2. Check if any client sent us some new message.…&lt;/div&gt;
&lt;/a&gt;</content:encoded></item></channel></rss>