[Essay★Socket Communication: Three-end communication, asynchronous, duplex, persistent connection, reconnection, and other technologies in WCF and socket Development

Source: Internet
Author: User

Recently I was working on a server management tool called optools. Functions include server process monitoring, game switch server, database backup, file distribution, and Server File Management.

 

The overall project architecture is divided into three ends: client (multiple) slave → central server (one) slave → game server (multiple)

 

① Client: Select winform

② Central server: use Windows Service

③ Game server: Because the game server needs to be cross-platform, there are Windows and Linux. Therefore, the script Language Python cannot be used in DOTNET.

 

The technical bottlenecks of the project mainly focus on communication. We have prepared two solutions:

1. Client (multiple) socket → central server (one) socket → game server (multiple)

2. Client (multiple) protocol WCF → central server (one) protocol socket → game server (multiple)

Cross-language communication is required between the center and the game server, so socket communication is required. The main difference is that socket and WCF are used to communicate with the client and the central server respectively.

 

At first, we chose the first solution to use socket for communication. It uses the shuttler.net framework of overred. However, when the development of monitoring and switch server functions was basically completed, it was found that the communication process was unstable, and various problems were hard to solve. Later, I decided to use a more mature WCF for communication.

 

It involves three-end communication, asynchronous, duplex, persistent connection, reconnection, and other technologies in WCF and socket.

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.