C # + ICE + TCP Communication = data transmission,

Source: Internet
Author: User

C # + ICE + TCP Communication = data transmission,

Recently, ICE file transfer was used in the project. Lesson 1 (ICE Introduction)

1. Introduction to ICE

ICE (Internet Communications Engine) is a high-performance middleware provided by Zeroc. Using ICE can make (C #, php, c ++, java or python) interact with java, c ++,. net, python, and so on. Based on ICE, telecom-level solutions can be implemented. ICE is a popular object-oriented middleware used as a network communication engine.

Ii. Advantages of ICE

3. Why is middleware used?

Imagine a scenario where a large website usually has many web servers and each web server has many database operations. If you directly operate the database on the program, you must

The user name and password of the database are configured on the server, which is extremely insecure. And if we want to manage and modify Database Operations in a unified manner, we need to modify the operations on each web server for a long time. Therefore, the middleware will produce

.

It is based on the SOA (Service-Oriented Architecture) idea. It unifies database operations into a service and places it on a service machine. Each web server must operate the database, you can directly access the service that provides the middleware service.

. Another point is that, considering performance issues, we do not use html or xml to transmit data for the server that provides services. TCP or UDP communication is generally used. Therefore, ICE is one of the most popular website development middleware.

Iv. ICE communication structure

ICE is divided into a Server providing services and a Client requesting services. The ICE components must be installed on both servers. Their communication structure is as follows:

 

The Client should know in advance what services can be provided by the Server and what format? This is the Proxy Code in the figure. Classes and interfaces are defined in the Proxy Code. The interface on the Server is defined as Skeleton.

The port is the Server Application. The Server Application can be written in C ++, java, and C #, but the ICE does not provide PHP to write to the Server.

 

 
Symbol in C Language <Yes

Left shift operator (<)

Removes all the binary bits of an operation object from the left and adds 0 to the right ).

For example, a = a <2 shifts the binary bits of a two places to the left and complements 0 to the right,

Move 1 to the left and then a = a * 2;

If the left shift does not include 1 in the Discard high position, then shifts one bit left, which is equivalent to multiplying the number by 2.
Shift right operator (>)

Shifts all the binary bits of a number to several places to the right, and adds 0 to the left of the positive number, 1 to the left of the negative number, and discards the right of the negative number.

The operand shifts one digit to the right, which is equivalent to dividing the number by 2.

For example, a = a> 2 shifts the binary bit of a two places to the right,

0 or 1 to see whether the number is positive or negative.

Symbol in C Language <Yes

Left shift operator (<)

Removes all the binary bits of an operation object from the left and adds 0 to the right ).

For example, a = a <2 shifts the binary bits of a two places to the left and complements 0 to the right,

Move 1 to the left and then a = a * 2;

If the left shift does not include 1 in the Discard high position, then shifts one bit left, which is equivalent to multiplying the number by 2.
Shift right operator (>)

Shifts all the binary bits of a number to several places to the right, and adds 0 to the left of the positive number, 1 to the left of the negative number, and discards the right of the negative number.

The operand shifts one digit to the right, which is equivalent to dividing the number by 2.

For example, a = a> 2 shifts the binary bit of a two places to the right,

0 or 1 to see whether the number is positive or negative.

Related Article

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.