This article explains how Linux manages TCP sockets at the kernel level, demonstrates how to adjust port ranges and file‑descriptor limits, and shows the key data structures and lookup functions that enable high‑concurrency TCP connections, providing practical guidance for scaling client connections.
This article explains how Linux manages TCP sockets at the kernel level, shows how to adjust system limits for massive concurrent connections, walks through key source code such as sock_common, tcp_v4_rcv, and inet_lookup, and provides practical tuning steps to achieve over a million simultaneous client connections.
The article explains why a client can successfully write to a TCP socket after the server has closed its end, why the first write succeeds while the second fails, and how Linux kernel code and TCP state transitions cause this behavior.
This article explains how to build a real‑time network chatroom in Java using TCP sockets, multithreading, and a ConcurrentHashMap to manage user connections, detailing command handling for listing users, group chat, private messages, exiting, and server shutdown, with full source code examples.
This guide explains how Linux socket I/O multiplexing (select, poll, epoll) powers high‑concurrency servers, why caching and asynchronous non‑blocking are crucial, and provides step‑by‑step instructions to install, configure, and develop with OpenResty, Nginx, and Lua for scalable backend applications.
This article walks through building and executing a Groovy‑based test script that registers two users, joins a room, exchanges chat messages over a Socket (WebSocket) connection, and cleanly closes the sockets, illustrating the full workflow and code structure for backend socket API testing.
This article introduces a reusable Java WebSocket client wrapper that adds convenient date handling, message logging, configurable constants, and performance‑testing utilities, explains its implementation details with full source code, and provides a simple demo showing connection, messaging, and graceful shutdown.
This article introduces the Linux ss command for displaying socket statistics, compares its speed and capabilities with netstat, provides common usage examples, explains state filters, and shows why ss is the preferred tool for efficient network monitoring and troubleshooting.
This guide walks through building a Netty server and client that exchange Java objects using Protobuf serialization, covering .proto definition, code generation with protoc, pipeline configuration with Netty's Protobuf handlers, and full example implementations for both sides.
This article explains how to use Java's java.net.Socket and ServerSocket classes to create a server and client that exchange string messages, detailing the blocking behavior of accept() and read(), and providing complete code examples for sending and receiving data in both directions.
This guide demonstrates a complete Java socket implementation that lets a client read an image file, stream its bytes over a TCP connection to a server, and have the server reconstruct and save the picture to disk.
This article explains the PHP pfsockopen() function, its parameters, return values, and provides a complete example demonstrating how to establish a persistent SSL socket, send an HTTP POST request, and read the response using low‑level socket operations.
fsockopen() opens a network or Unix socket connection in PHP, with detailed parameter explanations, default behavior, error handling, and two practical code examples demonstrating HTTP GET requests and UDP socket usage, along with notes on blocking mode and related functions.
This article explains why massive TIME_WAIT TCP connections appear under high concurrency, the impact on services, and practical methods—such as adjusting socket reuse and reducing TIME_WAIT duration—to prevent new connection failures.
Under high‑traffic conditions, servers can generate massive numbers of TCP TIME_WAIT sockets, consuming local ports and causing “address already in use” errors; this article explains the underlying causes, impact on services, and practical mitigation strategies such as keep‑alive headers and socket reuse.
This article explains the Java RMI communication model, the need for object serialization, the requirements for serializable classes, and provides complete example code for a Person class, object I/O operations, and a simple socket‑based stub‑skeleton implementation to demonstrate remote object retrieval.
This tutorial walks through creating a lightweight RPC system, illustrating how an order service can call a product service via dynamic proxies, socket communication, serialization, and service registration, while showing Maven module setup, API design, and concrete code examples for each component.
This article describes a Python project that implements a socket‑based file and folder transfer system using separate command and data threads, explains its design principles, provides the core FileFinder code, and shows how to run the server and client on Linux hosts.
This article explains TCP state definitions, Linux commands for monitoring connections, the three‑way handshake, four‑way termination, common pitfalls like SYN‑Flood attacks, and practical tips such as keepalive configuration to diagnose and resolve network or socket problems.
This article explains how to integrate and use ADBLib within an Android app, covering required Gradle and manifest configurations, step‑by‑step procedures for establishing a TCP/IP connection, generating encryption keys, retrieving the device IP, creating socket connections, and executing ADB commands, along with an overview of ADBLib’s underlying architecture.
This article explains common TCP pitfalls such as sticky packets, how to handle them with proper framing, the importance of heartbeat mechanisms for detecting broken connections, and reliable data validation techniques like length prefixes and MD5 checksums to build robust network applications.
This article explains why the author created a custom C++ TCP server framework, outlines the required prerequisites and coding standards, and walks through a minimal echo server implementation together with the key cppbox library interfaces and usage examples.
This tutorial shows how to create a Python client‑server pair that randomly generates a new Windows login password on a target machine, sends it over a socket to your server, and demonstrates how to revert the change using built‑in commands.
This comprehensive guide walks you through the core concepts of computer networking, including the OSI and TCP/IP models, detailed explanations of TCP and UDP protocols, HTTP fundamentals, socket programming, IP addressing, ICMP, ping operations, and the differences between routers, switches, cookies, sessions, and tokens.
This tutorial shows how to use a Python client‑server script to generate a random Windows login password on a remote machine, set it via the net user command, and capture the password on a server for later retrieval, complete with code and execution steps.
This guide explains three practical steps to harden MySQL installations: configuring strict datadir permission modes, relocating the MySQL socket file into the datadir with safe permissions, and leveraging the login‑path feature via mysql_config_editor to store credentials securely while simplifying client access.
This article provides a comprehensive guide to Java network programming, covering TCP/IP basics, socket concepts, InetAddress and URL APIs, detailed TCP and UDP client‑server implementations, multithreaded server handling, and practical code examples for building robust network applications.
This article documents the step‑by‑step conversion of a Python 2.6 script that uses socket.inet_aton() and MD5 hashing to Python 3.4, explaining the differences in return types, required byte‑string handling, and the final optimized solution.
The common belief that a machine can only handle 65,536 TCP connections is a misconception; in theory and practice a server or client can manage far more connections, depending on IP, port, and system limits.
This article provides a comprehensive, source‑code‑driven walkthrough of the Redis client‑server interaction, detailing the six main steps from socket establishment to command execution and response, while also covering auxiliary mechanisms such as beforeSleep processing, key expiration strategies, and the underlying epoll I/O multiplexing model.
This article uses a relatable mailbox story to explain Linux socket I/O models—including synchronous blocking, synchronous non‑blocking, I/O multiplexing with select, signal‑driven I/O, and asynchronous I/O—detailing their mechanisms, advantages, drawbacks, and typical code patterns.
This article explains how to design and implement a simple game server framework, covering the definition of server development, the two main game‑server architectures, core scene‑service requirements, a lightweight network library built on sockets, and sample C# code for connectors, server and client networking components.
The article explains why TCP’s TIME_WAIT state is essential for reliable data delivery, describes how excessive TIME_WAIT sockets can exhaust port resources in high‑concurrency short‑connection servers, and offers principled and practical mitigation techniques such as kernel sysctl tweaks and careful use of SO_LINGER.
This guide introduces Python’s socket module, explains socket families and types, details essential server and client functions, walks through step‑by‑step TCP connection creation, and provides complete server and client code examples for practical network programming.
This comprehensive guide reviews the essential elements of HTTP requests and responses, explains version differences, clarifies the distinctions between HTTP, Socket, and TCP, and provides practical iOS implementation details for developers seeking a deeper understanding of web communication.
This article explores four high‑performance TCP server models in .NET/C#—Asynchronous Programming Model (APM), Task‑based Asynchronous Pattern (TAP), SocketAsyncEventArgs (SAEA), and Registered I/O (RIO)—detailing their accept and read loops, implementation nuances, pooling strategies, and sample code, while highlighting performance considerations and real‑world usage.
This article demonstrates how to replace Node.js's limited parent‑child IPC with a simple, newline‑delimited JSON protocol over TCP or file sockets using Midway 5.0, providing full‑duplex client‑server communication for arbitrary processes.
This article explains why Node.js throws errors like ETIMEDOUT and EADDRINUSE, detailing the underlying glibc connect() function, its error codes, and how non‑blocking sockets and thread cancellation affect resource handling.