High-performance TCP & UDP Communication Framework Hp-socket v3.4.1 officially released

Source: Internet
Author: User

  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:

-----------------

    1. the TCP Pack Series component guarantees that each OnReceive event provides a complete packet to the application
    2. 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)
    3. the TCP Pack series components provide the Get/setmaxpacksize () and Get/setpackheaderflag () methods to set the maximum packet length and header identification
    4. Ctcppackserver implements Itcpserver interface, Ctcppackagent implements Itcpagent interface, Ctcppackclient implements Itcpclient interface

> Component Interface adjustment:

-----------------

    1. Onclose/onerror merged into one communication event: OnClose (Connid Dwconnid, ensocketoperation enoperation, int ierrorcode)
    2. enumeration Type Ensocketoperation adds an enumeration value: So_close = 5, identifies the close Socket operation
    3. IServer and Iagent Interface Removal interface method: Get/setrecvpolicy ()
    4. IServer and Iagent Interface Removal interface method: Get/setmaxshutdownwaittime ()

High-performance TCP & UDP Communication Framework Hp-socket v3.4.1 officially released

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.