Messaging Processing Flow

Source: Internet
Author: User

1. Structure of the message:

2. Message Delivery

A: Message definition: protocl/directory/common Some common messages,/proto_cs client server communication messages,/PROTO_SVR server communication messages, the respective directory should be the CMD definition and message definition belong to the corresponding file

B: Message encapsulation and sending: see the source code is good, there are similar cgamesvrpacketsendutil such as the delivery interface

3. Receipt of messages:

A: Receive message registration generally first in similar cbattlesvrapp->initprocessor register each need to process the message module, such as cloginprocessor, processing the login message, the processing module registered, with the cmd parameter

B: Message receiving process: Distance enet, enter Cpacketdisp::P rocessenetpacket, enter m_conneventhandlerimp.onconnectionmessage according to type

According to Cmd to find the corresponding processor, on the a step registered, into the Pprocessor->processclientpacket execution message processing

Messaging Processing Flow

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.