Tagged articles
socket programming
58 articles · Page 1 of 1
This article explains that listen() merely marks a socket as passive and initializes kernel queues; without it, servers reject incoming SYN packets with RST, yet client-side connect() and TCP simultaneous open can establish connections without ever calling listen().
TCPconnectinterview question
0 likes · 7 min read

This article explains the SO_LINGER socket option's three closure modes, demonstrates why SO_LINGER=0 sends RST instead of FIN, and outlines Linux's preferred solutions for TIME_WAIT accumulation—connection reuse, tcp_tw_reuse, tcp_fin_timeout, and port range expansion—over abrupt connection termination.
Linux kernelSO_LINGERTCP
0 likes · 16 min read

This article provides a comprehensive guide to Linux TCP development, explaining the role of system calls, the three‑way handshake and four‑way termination, detailing core socket functions such as socket, bind, listen, accept, connect, read/write, recv/send, and includes complete example code for building a simple TCP server and client with troubleshooting tips.
C++LinuxTCP
0 likes · 41 min read

This article introduces Linux networking fundamentals, covering LAN and WAN concepts, the purpose and structure of network protocols, OSI and TCP/IP layered models, MAC and IP addressing, and provides a practical guide to socket programming with ports, address families, and common API calls.
LinuxNetworkingOSI model
0 likes · 25 min read

Port 0 is a legal but reserved value in TCP/UDP headers that can be used by socket APIs to request a temporary port from the OS, while appearing in network traffic as a sign of testing, misconfiguration, or potential security anomalies.
NetworkingSecurityTCP/UDP
0 likes · 9 min read

This comprehensive guide walks you through Linux networking fundamentals, covering LAN/WAN concepts, protocol layers, OSI and TCP/IP models, MAC and IP addressing, data encapsulation, and practical socket programming with TCP and UDP, complete with diagrams and code examples.
NetworkingTCP/IPprotocols
0 likes · 22 min read

This article explores the root causes of packet loss in TCP and UDP—including application bugs, kernel buffer limits, network congestion, protocol limitations, and handshake failures—and presents practical solutions such as code optimization, socket tuning, congestion‑control adjustments, and forward error correction techniques.
TCPUDPnetwork troubleshooting
0 likes · 25 min read

This comprehensive guide walks readers through the basics of Linux networking, explaining concepts such as LAN, WAN, OSI and TCP/IP models, protocol layering, MAC and IP addressing, and introduces socket programming fundamentals, providing clear examples and diagrams to help beginners master network communication.
NetworkingOSI modelTCP/IP
0 likes · 22 min read

This article explains the fundamentals of socket programming in Python, covering basic concepts such as IP addresses, ports, and protocols, and provides complete TCP and UDP server/client code examples along with common troubleshooting tips and advanced modules for building robust network applications.
PythonTCPUDP
0 likes · 7 min read


ITPUBMar 24, 2025 · Fundamentals
This article explains why TCP and UDP can use the same numeric port, how client and server processes manage port sharing, and the role of socket options like SO_REUSEADDR and SO_REUSEPORT in enabling high‑availability and load‑balanced networking.
Port SharingTCPUDP
0 likes · 16 min read

This article explains the CoID (Corporation Internal Communication) protocol and provides complete PHP server and client code examples that demonstrate how to build reliable, secure internal messaging between enterprise systems using TCP sockets.
CoID ProtocolPHPnetwork communication
0 likes · 4 min read

This article explains the fundamentals of network I/O, covering hardware basics, process scheduling, blocking and non‑blocking models, multiplexed I/O techniques such as select/poll/epoll, asynchronous I/O, socket types, and the user‑kernel boundary, providing a comprehensive guide for backend developers.
EpollLinuxbackend development
0 likes · 39 min read

Learn how to use Go's net package for low‑level socket programming—including TCP, UDP, and ICMP connections with the Dial function—and build HTTP clients with net/http, covering basic requests, POST forms, custom headers, and practical code examples.
GoHTTPbackend development
0 likes · 12 min read

This article explains the CoID (Corporation Internal Communication) protocol and provides step‑by‑step PHP code examples for building a TCP socket server and client that exchange JSON‑encoded messages, demonstrating how to achieve reliable, secure internal communication within an enterprise.
CoID ProtocolPHPbackend development
0 likes · 4 min read

This article explains Go's socket programming workflow, detailing the traditional steps of creating, binding, listening, and communicating over sockets, then shows how net.Dial simplifies connections for TCP, UDP, and ICMP, and demonstrates practical HTTP client usage with code examples.
GoHTTPnet.Dial
0 likes · 11 min read

This course provides an in‑depth exploration of core backend concepts, covering process fundamentals, TCP/IP socket communication, Nginx integration with PHP‑FPM via FASTCGI, host‑to‑network byte order conversion, and Redis basics, aiming to equip developers, sysadmins, and network engineers with comprehensive backend development skills.
NginxRedisbackend development
0 likes · 3 min read

This article explains Go’s socket programming model, covering the classic five‑step workflow, the versatile net.Dial function, and practical code examples for ICMP, TCP, and HTTP client operations, helping developers build networked applications efficiently.
Code ExamplesGoHTTP
0 likes · 10 min read

This article explains the fundamentals of socket programming, detailing server and client setup steps, the TCP three‑way handshake, criteria for readable and writable sockets, and advanced techniques such as multi‑process models, I/O multiplexing, the Reactor pattern, and Epoll’s role in efficient event‑driven networking.
EpollI/O multiplexingReactor Pattern
0 likes · 9 min read

This article provides a comprehensive overview of computer networking fundamentals, including C/S and B/S architectures, OSI layers, TCP/UDP protocols, socket programming, code examples, and the concepts of synchronous, asynchronous, blocking, and non‑blocking I/O in Linux.
TCPUDPnetwork protocols
0 likes · 28 min read

This article outlines five frequent mistakes in C socket programming—ignoring return values, mishandling peer closures, address‑in‑use errors, endianness issues when sending structured data, and false assumptions about TCP framing—while providing concrete code examples and Linux debugging tools to help developers write more reliable network code.
C++error handlinglinux-networking
0 likes · 13 min read

This article explains the Management Component Transport Protocol (MCTP), its Linux address family implementation AF_MCTP, driver and network configuration steps, socket programming examples, debugging techniques, and real‑world applications for component monitoring and management in firmware ecosystems.
AF_MCTPLinux kernelMCTP
0 likes · 10 min read

This article provides a comprehensive guide on building a network port scanner using Python, covering implementation principles, code examples, and practical usage instructions.
Port ScannerProgramming TutorialPython
0 likes · 8 min read

Facing frequent packet loss and network jitter that disrupts video conferences, this article examines TCP/IP stack heartbeat and retransmission mechanisms, demonstrates how to configure Windows keepalive parameters, and provides code examples for custom socket options and non‑blocking connect timeouts to maintain session continuity within 60 seconds.
TCPkeepalivenetwork jitter
0 likes · 22 min read

This article explains Linux's socket networking framework, details BSD Socket APIs, the abstraction and VFS layers, protocol families, and provides comprehensive guides with code samples for creating, configuring, and using TCP and UDP sockets in C.
C++LinuxTCP
0 likes · 33 min read

While UDP is often assumed to be faster than TCP, this article explains socket basics, the reliability mechanisms of TCP, scenarios where UDP can be slower, and how application-layer solutions like KCP or QUIC add reliability, helping readers understand when each protocol truly excels.
TCPUDPcongestion control
0 likes · 13 min read

The article explains how the Linux kernel implements the TCP three‑way handshake, detailing server listen queue allocation, client connect port selection and SYN transmission, SYN‑ACK processing, state transitions, request‑socket management, full‑connection queue handling, and the final accept call, plus tuning tips.
Linux kernelTCPaccept
0 likes · 19 min read

This article uses a conversational story to explain what it means to listen on a network port, covering TCP vs UDP, binding to specific IPs, reuse‑port options, IPv4 and IPv6 differences, and demonstrates the concepts with multiple Python socket code snippets.
IPv4IPv6Python
0 likes · 13 min read

This article walks through creating a Linux packet sniffer that bypasses libpcap, explains PF_PACKET raw sockets, shows how to bind to a specific interface, enable promiscuous mode, attach a BPF filter compiled with tcpdump, and parse Ethernet and IP headers in a continuous receive loop.
BPFLinuxPF_PACKET
0 likes · 26 min read

This article provides an in‑depth tutorial on TCP, covering its header structure, three‑way handshake, reasons for three handshakes, four‑way termination, TIME_WAIT, SYN attacks, Linux kernel parameters, and practical socket programming examples, all illustrated with diagrams and code snippets.
Connection ManagementNetworkingTCP
0 likes · 43 min read

This article demonstrates how to create a basic FTP‑like file transfer application in C using Windows Winsock, covering both server and client implementations, handling file size negotiation, data transmission loops, and compilation steps, with complete source code examples.
C++TCPWinsock
0 likes · 6 min read

This article explains how Linux servers handle binding to 0.0.0.0, detailing the internal mechanisms of socket binding, listening, and packet processing, with source code analysis to clarify the differences between binding to 0.0.0.0 versus specific IP addresses.
0.0.0.0 bindingTCP/IPlinux-networking
0 likes · 6 min read

This article introduces core networking concepts for developers, covering the OSI layers, the roles of IP, TCP, and HTTP, the TCP three‑way handshake, step‑by‑step socket connection setup, HTTP connection traits, and key differences between TCP and UDP.
HTTPTCP vs UDPTCP/IP
0 likes · 9 min read

This article explains the internal mechanics of Unix Domain Sockets, shows how they differ from traditional 127.0.0.1 TCP loopback, provides sample code for server and client, and presents benchmark results demonstrating significantly lower latency and higher throughput for local IPC.
IPCUnix Domain Socketlinux-networking
0 likes · 11 min read

This article explains the low‑level mechanisms by which tcpdump intercepts network packets in the Linux kernel, covering both the receive and transmit paths, the interaction with netfilter, and the steps required to implement a custom packet‑sniffing program.
Packet Capturenetfilternetwork debugging
0 likes · 12 min read


21CTOJun 15, 2021 · Backend Development
Learn how Linux’s non‑blocking I/O mechanisms such as select, poll, and epoll enable high‑concurrency servers, explore OpenResty’s Lua‑based architecture, and follow step‑by‑step instructions for installing, configuring, and troubleshooting a performant OpenResty/Nginx environment on Linux.
EpollLinuxLua
0 likes · 11 min read

An intermittent 403 error caused by nginx reuseport misrouting on a shared IP was traced to kernel listener hash table ordering; upgrading the Linux kernel from 4.14 to 4.16+ resolved the issue by prioritizing IP+PORT over INADDR_ANY lookups.
LinuxNetworkingNginx
0 likes · 10 min read

The article presents sixteen practical TCP network‑programming best practices—from setting SO_REUSEADDR and defining port standards to using application‑layer heartbeats, exponential backoff, connection limits, client‑side load balancing, periodic DNS refresh, optimal buffer sizing, configurable timeouts, proper connection‑pool sizing, and comprehensive metrics—to help developers build stable, reliable applications.
Connection PoolLoad BalancingNetwork Monitoring
0 likes · 28 min read

This article explains the differences and interactions between the SO_REUSEADDR and SO_REUSEPORT socket options, shows how they behave on BSD and Linux kernels across versions, and provides code examples and tables to illustrate binding rules, TIME_WAIT handling, and the evolution of reuse‑port support.
Linux kernelSO_REUSEADDRSO_REUSEPORT
0 likes · 14 min read

This article presents a comprehensive walkthrough of a Java chat application built with Netty for server‑side communication and Swing for the client UI, detailing functional features such as password, nickname, and signature updates, friend management, single‑chat messaging, online status detection, and includes full source code snippets and execution screenshots.
Friend ManagementJavaNetty
0 likes · 19 min read


JavaEdgeNov 2, 2020 · Backend Development
This article explains the fundamentals of traditional socket programming and compares it with Netty's architecture, covering server and client components, HTTP request handling steps, Netty's NioEventLoop, Channel, ByteBuf, Pipeline, and unsafe implementations, all illustrated with diagrams and code snippets.
JavaNettyNetwork IO
0 likes · 6 min read

This article explains Linux socket programming techniques such as non‑blocking I/O and epoll, discusses caching and asynchronous design for high‑performance servers, and provides a step‑by‑step guide to installing, configuring, and developing with OpenResty (Nginx + Lua) on Linux and Windows environments.
LuaOpenRestyhigh concurrency
0 likes · 12 min read

This tutorial walks through creating a Netty-based socket server and client in Java, covering project setup, event loop groups, channel initializers, codec pipelines, custom handlers, and the activation flow that enables bidirectional message exchange.
NIOServer-Clientchannel handler
0 likes · 10 min read

This guide explains how to use Linux non‑blocking socket APIs (select, poll, epoll) and the OpenResty platform (Nginx + LuaJIT) to create scalable, high‑concurrency web services, covering architecture, caching strategies, and step‑by‑step installation and configuration.
LinuxLuaNginx
0 likes · 11 min read

This article demonstrates how to build a Python TCP port scanner using raw sockets, adds service fingerprinting by sending probes, speeds up scans with multithreading, and shows an alternative approach using the nmap library, complete with example code and sample output.
Multithreadingnmapport scanning
0 likes · 5 min read

This tutorial shows how to use a short Python socket program and the PIL library to capture the PC screen, serve it over HTTP, and view the continuously refreshed desktop on a mobile device by simply entering the server’s IP and port.
Mobile AccessPythonremote desktop
0 likes · 4 min read

This article explains why TIME_WAIT occurs, its resource impact, and demonstrates two optimization strategies—accelerating TIME_WAIT reclamation and using the SO_LINGER option to send an RST packet instead of the normal FIN handshake, with complete Go client and server examples and packet‑capture analysis.
RSTSO_LINGERTCP
0 likes · 8 min read

This article explains TCP fundamentals—including the three‑way handshake, data transmission, and four‑way connection termination—by building a local Python TCP server and client, capturing the traffic with Wireshark, and analyzing each packet in detail.
NetworkingPythonTCP
0 likes · 10 min read

Understanding TCP state transitions, common diagnostic commands, and the detailed processes of connection establishment, termination, and related issues such as SYN flood, TIME_WAIT, and keepalive mechanisms equips engineers to troubleshoot network and system faults effectively.
LinuxTCPTCP states
0 likes · 28 min read

This article explains the TCP connection process, detailing socket creation, the roles of send and receive buffers, the functions socket(), bind(), listen(), accept(), and how address/port reuse and SYN flood mitigation affect performance and reliability.
LinuxTCPaccept
0 likes · 25 min read

This article delivers a comprehensive, experiment‑driven guide to IPv6, covering its 128‑bit address scheme, Linux kernel stack, practical setups such as stateless autoconfiguration and web services, various transition mechanisms like dual‑stack, tunneling and NAT64/DNS64, and detailed socket‑programming considerations for developers.
IPv6LinuxNetworking
0 likes · 38 min read

This article explains the concept of NoSQL, contrasts it with traditional SQL databases, and walks you through building a minimal key‑value NoSQL server in pure Python, covering schema basics, indexing, message parsing, command handling, and practical code examples.
NoSQLPythonTCP/IP
0 likes · 24 min read

This tutorial explains why mastering low‑level socket programming is valuable, introduces TCP/IP fundamentals, walks through creating a TCP socket server in Python, shows how to implement a simple HTTP server, and suggests ways to extend the server with multithreading and additional features.
HTTP serverPythonnetwork programming
0 likes · 12 min read

This article examines three common TCP issues—missing client‑side socket timeouts leading to monitor‑killed processes, excessive TIME_WAIT sockets after service failures and their kernel tunables, and 40 ms keep‑alive latency caused by Nagle and delayed ACK—explaining kernel behavior and offering practical configuration fixes.
Linux kernelNagle algorithmTCP
0 likes · 19 min read

This article explains how to determine whether a client device supports IPv4‑only, IPv6‑only, or dual‑stack networking on iOS and Android, covering gateway detection, DNS analysis, socket‑connect tests, and practical code samples for reliable IP‑stack identification.
AndroidIP stack detectionIPv6
0 likes · 20 min read

This article explains IPv6 socket programming fundamentals, focusing on NAT64/DNS64 transition mechanisms, handling various IP‑stack combinations, and detecting client support, with practical code examples and workflow diagrams relevant to iOS 9 and broader platforms.
DNS64IPv6NAT64
0 likes · 13 min read


21CTOSep 8, 2015 · Backend Development
This article explains the fundamentals of TCP/IP and UDP protocols, clarifies where sockets fit in the network stack, describes their role as a façade layer, and provides a complete MFC‑based client‑server example with full source code for initializing, binding, listening, connecting, sending, and receiving data.
C++MFCTCP/IP
0 likes · 9 min read

This guide explains what Unix domain sockets are, shows how to create a socket file, and provides step‑by‑step Nginx and PHP‑FPM configuration instructions for establishing inter‑process communication on a Linux server.
Linux OperationsUnix Domain Socketsocket programming
0 likes · 3 min read

After weeks of puzzling over intermittent socket disconnections in a persistent‑connection server, the author finally traced the fault to a missing timeout/notification when the remote service drops while awaiting an authentication code—a revelation sparked by a noisy office party, a spilled cola, and a missed elevator.
backend developmentdebuggingproblem-solving
0 likes · 7 min read
