1. Preface: Elements of communication

Normal person/thing, orderly, responsive.

2. Build communication between people

First of all, this is not a philosophy or communication blog, this is purely technical blog, but this topic is too much related to people, so I can not bear to give up the metaphor is too graphic.

Interpersonal communication is based on people having the same language meaning, such as speech, writing, body language and so on.

There are the following scenarios:

I was shopping with my girlfriend. She was picking out clothes for me, and I was watching her pick out clothes for me. The earnest look made my mouth curl gradually, and I thought about the name of my child in the future (although I thought about it for many times, I had new ideas every time). (0)

Suddenly she said, “What do you think of this dress? Try it.” (1)

When I heard her say something, I responded with a giggle on my face and said, “Ok.” (2)

She nodded and handed the clothes to me and said, “Go and change them for me.” (3)

The above is the process of communication. The purpose is that my girlfriend asks me to change new clothes to make her feel better. (0) is the precondition, indicating that people are normal. All right, let’s cut to the chase.

(1) My girlfriend talked to me, which means that she is up.

(2) I hear what my girlfriend says, react to it, show that I care about her, that I’m listening to her, (giggles and says a line along her lines)

Satisfied with my performance (nods), she offered me the clothes to change and flirted with me (told me to kangkang).

Okay, here’s the point: communication is about correspondence. In the above scene, my girlfriend and I are accomplished through the confirmation mechanism of speech, expression, eyes and movement. How can we accomplish this with only binary computer hardware? Back.

TCP communication

If my girlfriend and I were just two pieces of hardware that could only communicate over a TCP connection (sad), here’s how she would communicate with me in the above scenario:

1. She initiates a connection request with the SYN field (indicating she wants to talk to me) + SEQ field (indicating her mood, possible topic, etc.).

2. I received this connection request, which I would have done with a smirk before, but now I can only reply with a) ACK field + seq field.

3. After she received it, she gave me a comment on my performance (it indicated that she had received it) and sent it to me together with ack field, SEQ field (topic direction) and data (specific content).

This restores the process of the first scene (abstraction)

So now let’s think about why it has to be three steps, because she can just tell me what’s wrong with her, right? However, your girlfriend watches your reaction from the first sentence, so it’s really three steps:

She expresses 2. I receive and react 3. She receives my feedback and decides what to say next.

The necessity of three steps

Well, some people still insist that not three steps, one step to the stomach can always be two steps.

Let me talk about the necessity of a three-way handshake.

In real life:

If the girl friend is not my second step to make the reaction, continue to go my own way, talk do not consider my feelings, I will afflict, I will be sad, and then run away from home, ~~~ net cafe bag night ~~~, very dangerous.

Online world:

The first situation: if my girlfriend turned a blind eye to my ACK, I would worry about her safety. In order to protect my little secret and hers, I refuse to communicate with anyone pretending to be her.

2. Who should I respond to when my girlfriend posted her segment time out? Is there a response to the second one? Right. How can I guarantee that? I can’t promise, I can only ask her (ACK) through the third step, send the segment, which connection she wants to establish with me now, so that our communication can continue.

So step three — letting my girlfriend know I get what she wants — is important, both in the physical and online world.

Finally, a technical expression is attached

Client is the active party, server is the passive party (general case)

  1. clientserverasyn=1 + seqClientAt this timeserverIs listening
  1. serverclientaAck=1 + syn=1 + seqServer + ack=seqClient+1
  1. clientserveraAck=1 + seqClien++ + ack=seqServer+1 + data

Syn indicates a connection, seqClient is an initial random number. Ack indicates that the request to establish a connection has been received. Ack indicates that I have also established a connection. SeqServer means that this is the initial random number of the server. Ack means that the server’s connection request has been received by the client. SeqClien++ means that this is a follow-up to the previous one, Ack =seqServer+1 indicates that I also received the message from the previous server. Data is the specific content, and the connection is set up to send this thing.

This article continues to understand protocols through scenarios.