Cocos2d-x Development Network Game

Source: Internet
Author: User
Tags socket
Network Games Network Connection part of the main TCP connection and UDP connection, due to the requirements of the game to choose which kind, according to the actual situation, usually LAN PvP game for UDP, because the local area network data transmission is relatively stable. This is where the server-side development language is Java, and the client-selected development language is C + + for cocos2d-x. For socket programming, COCOS2DX is not like a third-party development library, so to achieve a cross-platform socket we can only choose BSD socket. BSD sockets do not require the introduction of third-party development libraries, which are largely supported by each platform. However, some of the sorry BSD sockets do not conform to the object-oriented programming principles (c), but fortunately, we can integrate the third-party development library ourselves. Here I chose the third-party development library SOCKETCC and PTHREADCC, they are a C + + package for BSD sockets, I have successfully compiled under Android and iOS. If you are introducing and using these two libraries on these two platforms,

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.