Apr 26, 2025 · 6 min read · Building on my previous exploration of a traditional event-driven chat server in C++ with epoll, I've now implemented a modern solution using C++20 coroutines. While both approaches leverage epoll's efficiency, coroutines provide a more natural, sync...
Join discussionApr 13, 2025 · 8 min read · After implementing a simple chat server in Go using goroutines for client handling, I wanted to explore an alternative approach using C++ and the epoll event notification mechanism. While Go abstracts away many of the complexities of concurrent progr...
Join discussionMay 20, 2024 · 3 min read · Some traditional methods to scale a Python program Threading Pros: Lightweight compared to processes Multiple threads can share memory (this can also be a downside) Cons: Python has a GIL, so it's not good for CPU-heavy tasks Sharing memory bet...
Join discussionMar 9, 2024 · 5 min read · 在网络编程中,当需要使用单线程处理多客户端的连接时,常使用select()或者poll()来处理,但是当并发数量非常大时,select()和poll()的性能并不好,epoll()的性能大大好于select()和poll(),在编写大并发的服务器软件时,epoll()应该是首选的方案,本文介绍epoll()在网络编程中的使用方法,本文提供了一个具体的实例,并附有完整的源代码,本文实例在 ubuntu 20.04 下编译测试完成,gcc 版本号 9.4.0。 1 基本概念 在『网络编程专栏』中...
Join discussion
Nov 6, 2022 · 8 min read · WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. WebSocket is distinct from HTTP. Both protocols are located at layer 7 in OSI model and depend on TCP at layer 4. The only con...
Join discussion