TouchSocket Documentation
repository·master·Indexed 22 days ago
https://github.com/rrqm/touchsocketA high-performance .NET networking framework for building scalable communication applications supporting TCP, UDP, MQTT, WebSocket, SSL, HTTP, Modbus, and RPC. It features a flexible plugin/adapter architecture, optimized memory management via TouchSocket.Core, and specialized extensions including TouchSocket.AspNetCore for web services, TouchSocket.CoAP for Constrained Application Protocol, and TouchSocket.Dmtp for duplex binary data communication.
What's inside TouchSocket
- TouchSocket.JsonRpc is a component library designed to provide both JsonRpc servers and clients. It allows developers to build communication layers using Tcp, Http, and WebSocket protocols. It is designed for cross-platform compatibility, enabling seamless integration with platforms such as Web and Android.
Overview of TouchSocket.XmlRpc
masterTouchSocket.XmlRpc is a component library designed to provide both XmlRpc server and client capabilities. It allows developers to create XmlRpc service parsers that fully support XmlRpc data types, including complex nested types and arrays. It is specifically designed to work seamlessly withCookComputing.XmlRpcV2, enabling integration across various platforms without the restrictions typically found in Web or Android environments.Overview of TouchSocket.NamedPipe
masterTouchSocket.NamedPipe is a component library based on Named Pipes. It encapsulates Named Pipe servers and clients, along with connection and disconnection messages, to mimic the experience of using TCP. This allows developers to use Named Pipes with an API surface that is extremely close to standard TCP implementations, reducing the learning curve.Overview of TouchSocket.WebApi.Swagger
masterTouchSocket.WebApi.Swagger is a Swagger UI component library specifically designed forTouchSocket.WebApi. It provides a visual interface in the browser to debug and test WebApi endpoints directly, improving development and testing efficiency. The library embeds all necessary static resources (HTML, CSS, JavaScript) into your project to simplify deployment.Overview of TouchSocket.Semi
masterTouchSocket.Semi is a semiconductor protocol library designed for communication between semiconductor equipment and hosts. It provides implementations for:
- HSMS (SEMI E37): A TCP-based transport layer.
- SECS-II (SEMI E5): Data item parsing and serialization.
It is intended for developers building semiconductor automation and communication software.
Overview of TouchSocket.Http
masterTouchSocket.Http is a component library based on the HTTP/1.1 protocol. It provides a comprehensive suite of networking capabilities, integrating an HTTP server, an HTTP client, and WebSocket components to handle complex network communication scenarios.Overview of TouchSocket.Core features
masterTouchSocket.Core is a foundational service library designed to provide high-performance utility components for .NET applications. It focuses on resource management, data processing, and system utilities to reduce overhead and improve efficiency.
Key functional areas include:
Memory & Object Management
- Memory Pool: Efficiently manages memory resources to reduce allocation and reclamation overhead.
- Object Pool: Reuses object instances to avoid the performance cost of frequent creation and destruction.
Data Processing
- Streaming Data Unpacker: Efficiently unpacks streaming data for easier parsing and processing.
- High-Performance Binary Serializer: Provides fast binary serialization and deserialization.
Logic & Communication
- Waiting Logic Pool: Manages waiting logic to improve asynchronous operation efficiency.
- AppMessenger: An in-app messaging mechanism for facilitating communication between different modules.
File & Storage
- File Pool: Optimizes file resource usage.
- File Quick Operations: Provides convenient methods for reading, writing, copying, and moving files.
- XML Fast Storage: Enables rapid storage and retrieval of XML data.
Security & Monitoring
- 3DES Encryption: Provides 3DES encryption algorithms for data security.
- Runtime Measurement: Tools to measure code execution time for performance optimization.
- Standardized Logging Interface: A unified interface for managing application logs.
Overview of TouchSocket.Mqtt
masterTouchSocket.Mqtt is a component library designed to provide both MQTT server and client capabilities. It allows developers to create MQTT servers and clients based on TCP and WebSocket protocols. It is designed for full MQTT feature support and seamless integration with various platforms, including Web and Android.Overview of ThingsGateway
masterThingsGateway is a cross-platform edge collection gateway built on NetCore designed for industrial device data acquisition. It provides a framework for collecting data from various industrial protocols and includes components for device driver development and administrative management.Overview of TouchSocket.Rpc
masterTouchSocket.Rpc is an ultra-lightweight, high-performance, and extensible RPC management platform framework. It is designed to allow developers to quickly implement RPC execution functionality. The framework is highly extensible, allowing for the addition of new RPC types and features as needed.Overview of TouchSocket.WebApi
masterTouchSocket.WebApi is a component library designed to provide both WebApi server and client capabilities. It enables developers to create WebApi service parsers and clients to facilitate cross-language RPC (Remote Procedure Call) function calls across desktop, web, and mobile platforms.
Key features include:
- Cross-platform calling: Supports RPC function calls across desktop, web, and mobile environments.
- Parameter passing: Supports both
GetandPostmethods for passing parameters. - Custom routing: Allows developers to define and customize WebApi routes.
Overview of TouchSocket.Rpc.RateLimiting
masterTouchSocket.Rpc.RateLimiting is an extension package for the TouchSocket RPC management platform. It provides rate-limiting capabilities for RPC calls, allowing developers to control the frequency of RPC requests to prevent system overload and performance degradation during high concurrency.
It is compatible with all RPC types supported by the platform, including:
DmtpRpcXmlRpcJsonRpcWebApi