Hp-socket is a general-purpose, high-performance TCP/UDP communication framework that includes server-side components, client components, and Agent components, and is widely used in TCP/UDP communication systems in a variety of applications, from C + +, C #, Delphi, E (Easy language), Java, Programming language interfaces such as Python. Hp-socket completely encapsulates the communication layer, the application does not have to focus on any details of the communication layer, and Hp-socket provides an API interface based on the event notification model, which can be easily and efficiently integrated into the old and new applications.
pull Model example, pack model examples, performance test examples, and other programming language examples). Hp-socket is currently running on the Windows platform and will implement cross-platform support in the future.
"Hp-socket v3.4 Development Guide"
----------------------------------------------------------------
Versatility
- Hp-socket's sole responsibility is to receive and send byte streams, not to participate in application protocol resolution.
- Hp-socket interacts with the application through an interface and is fully decoupled. Any application can seamlessly integrate Hp-socket as long as the Hp-socket interface specification is implemented.
Ease of Use
- ease of use is essential for all common frameworks, and it is not as easy to write them as you would if they were too difficult. Therefore, the Hp-socket interface is designed to be very simple and uniform.
- the Hp-socket completely encapsulates all the underlying communication details, and the application does not have to interfere with the underlying communication operations. The communication connection is abstracted to the Connection id,connection ID as the unique identity of the connection provided to the application to handle the different connections.
- Hp-socket provides push/pull/pack and other receive models, the application can flexibly choose to handle the package in manual, semi-automatic or fully automatic way, the Pull/pack receiving model reduces the complexity of packet processing and greatly reduces the chance of error.
High Performance
- Client component: based on the Event Select communication model, the communication operation is performed in a separate thread to avoid interfering with the main thread or other threads. Each Component object manages a Socket connection.
- Server components: based on the IOCP communication model, combined with technology such as the cache pool, private heap, and other technologies, to support ultra-large-scale connections, in high-concurrency scenarios to achieve efficient memory management.
- Agent components: for scenarios such as proxy servers or transit servers, the server itself also initiates large-scale connections to other servers as a client, and an agent Component object can manage multiple Socket connections at the same time; Agent components and server Components use the same technical architecture that can be used as client parts for a proxy server or a staging server.
Elasticity of
Applications can adjust Hp-socket performance parameters (e.g. number of worker threads, size of cache pool, send mode and receive mode, etc.) based on realistic scenarios such as different capacity requirements, communication scale and resource status, and optimize resource allocation to meet application needs without wasting resources.
(Project homepage: Click here: click here)
* * * v3.4.1 UPDATE * * *
> Add TCP Pack Series Communication components:
-----------------
- the TCP Pack Series component guarantees that each OnReceive event provides a complete packet to the application
- TCP Pack Series components are a combination of the push/pull pattern, where applications do not have to process subcontracting (e.g. PUSH) and data fetching (e.g. pull)
- the TCP Pack series components provide the Get/setmaxpacksize () and Get/setpackheaderflag () methods to set the maximum packet length and header identification
- Ctcppackserver implements Itcpserver interface, Ctcppackagent implements Itcpagent interface, Ctcppackclient implements Itcpclient interface
> Component Interface adjustment:
-----------------
- Onclose/onerror merged into one communication event: OnClose (Connid Dwconnid, ensocketoperation enoperation, int ierrorcode)
- enumeration Type Ensocketoperation adds an enumeration value: So_close = 5, identifies the close Socket operation
- IServer and Iagent Interface Removal interface method: Get/setrecvpolicy ()
- IServer and Iagent Interface Removal interface method: Get/setmaxshutdownwaittime ()
High-performance TCP & UDP Communication Framework Hp-socket v3.4.1 officially released