Using Protobuffer as the implementation and process of network communication Packet Protocol in Unity

Source: Internet
Author: User
A library to use

Protobuffer has two C # implementations, of which the Protobuffer-csharp version is more suitable for cross-language development, and this version mimics the Java implementation; On iOS, we want to use the Lite version, and we need to change the code and drop the Pluginregistry function, otherwise it cannot be used on iOS, the iOS platform mono only supports AOT.
The Protobuffer-csharp code after castration:
To be continued (subsequent provision)

Two protocol generation process implementation

Using scripts to automatically generate protocol code for Java and C # versions
Linking to clients using SVN external

Three-client network processing

Network streams are divided into two types:

request response 形式push 形式

Using the Requese to send the response form message;
Use the global listener to process the push type message.

Sample client code:

链接: http://pan.baidu.com/s/1mgtDiGw 密码: 533o

Using Protobuffer as the implementation and process of network communication Packet Protocol in Unity

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.