Original:The big Ming Dynasty Postman of TCP/IP
original 2016-05-12 Liu Xin Yard Farm roll overPreface: This article mainly wants to say the TCP knowledge, the analogy has the inappropriate place, please forgive.
Daming dynasty Four years, early morning.
As soon as the sky was dawn, I rushed to the South Gate with a carriage full of goods, here is the place where the goods were concentrated, a team of carriages came here, the soldiers with a helmet, wearing armor, armed with a spear, staring at the next movement.
In the big shed at the gate of the city is a crowd of people gambling together, these guys are wearing the same clothes, chest and back written three characters "TCP Postman"
I know this is the person I am looking for, they will help me to send out the goods.
I got out of the car, looked around in the shed, and found a bored lad sitting alone drinking shot after shot.
"Postman brother, Help me to send this car goods."
The lad stood up lazily and said, "Where are you from, and where are you going?" ”
I hastened to take out the address said: "I live in our Town No. 224 North Turn Street, to send a car cargo to Neixiang County Ya"
"Neixiang County ya have a lot of doors, your goods into that door ah?" The postman then asked.
"The boss told me to go to gate 80th. ”
The postman said: "Go, let's go ahead." ”
In front of the big shed is a large number of open spaces, maybe we come early, now only me, postman brother, of course, and my carriage.
"You wait, I first set up a connection to Neixiang County," said the postman, blowing a whistle, a horse ran over.
He picked up a brush in a piece of paper wrote a letter: "County government county government, I am the capital, I want to establish a connection with you, my serial number 1024, received please reply!" ”
The envelope says: The place of delivery: No. 224 North Turn Street of the capital: Neixiang County ya, Gate No. 80th
Then put this piece of paper on horseback on the Dalian, patted the kiss-up shares: "Let's go." ”
After two hours, the horse came back, the postman took out the letter Ma Yun back, which reads:
"The capital of Beijing, received your letter, your letter inside a serial number is 1024, right?" Agree to establish our connection, my side number is 2048 "
The postman smiles: "Look, the connection is about to build, and I'll send them a letter."
"County government county government, I received your confirmation letter, also saw your serial number is 2048, I began to ship"
I asked him: "This is the connection, I did not see you pull a line to the capital and county government together ah."
The postman said: "This you do not understand, this is the TCP connection, is virtual, the state information of the connection is not saved on the road, on the contrary, the state information of the connection is maintained at both ends, that is, I here and county government to maintain together." ”
"Then why did you send three letters?" ”
"This is the three-time handshake ah, I give you to analyze Ah, this three times the handshake is mainly to verify my side and county government side of the letter/receiving ability is no problem, so that the connection is through, can be formally shipped." ”
The first handshake: the capital sent letters, county government received, at this time county government will understand: the capital and their ability to receive the letter is no problem.
Second handshake: County government letter, the capital received, at this time the capital will understand: the capital of letters and received letters are good, county government letter and receive letters are also no problem. Otherwise not receive county government reply, but county government still do not know their letter function? So a third handshake is required:
The third handshake: the capital letter, county government received, at this time the capital has confirmed that the double hair received letters, letters are no problem, the purpose of this response is to eliminate the county government to their own letter function and the capital of the credit function of the worry just.
To tell the truth, I am a little dizzy, the postman said: "You know how to ponder." ”
I asked him: "You are so hard to establish a connection, don't you go to deliver it in person?" ”
The postman said, "I'm not going!" This Shongo since the throne, all day carpentry like carpentry, ignore court politics, led to hardship, large fields barren, bandits, wild beasts, long ago no one dared to risk to deliver. So the cabinet of the ministers have thought of a recruit, the construction of the road in all directions, so that the horse, donkey these livestock to deliver, even if the tiger eaten there is no loss, the celestial state is very people-oriented. ”
"Then how do these horses know to send my goods to Neixiang County ya?"
"Do not worry, they are trained, will walk along the road, at every fork of the court will build a post, male can eat grass drink rest, more critical is that every officer will look at the letter I just wrote, they know the road, and then the horse to a new correct DAO, continue to walk, In the end, we can get to Neixiang County ya. All right, let's get these stations up. Individual name: Router "
"What if the horse is lost or eaten by a tiger, or can't come back?" ”
"That's what our TCP postman is going to do, and you'll see," I came to see your goods, hey ah, you this cupboard is too big, a horse carry not go, scored into small parcels, a one shipped "
I had no choice but to take apart a large piece of cargo and divide it into small parcels.
"Make a number for each package," the postman said. "So that they can assemble them and restore them as they are," Neixiang County.
I suddenly thought of a serious problem: "In case the horse was robbed by robbers." I'm not going to lose a leg in this locker.
The postman was surprised: "No way, the Cabinet of the big people said, this situation, will resend the parcel." ”
Rub, my heart has 10,000 sheep camel run over: This help adults really stand talking not waist ache ah, in case the cabinet leg lost, I still have to redo ah.
The postman placed the parcel in a column numbered 1, 2, 3, ... 10, altogether 10 parcels.
"According to the regulations we send up to 3 parcels each time, according to the serial number, first hair 1, 2, 3rd package" Postman said to call 3 horses, loaded, horse disappear ran away.
I was waiting for fear that a parcel would be lost.
But how to know if the package is county government.
The postman seems to see my mind, from the bosom out of an hourglass said: If the leak, county government has not confirmed to us, it is lost, only re-hair.
After an hour, I look forward to the county government horse finally came, the inside of the letter said: No. 1th parcel received.
"All right," said the postman, "county government confirmed receipt of package 1th, we can send another one," said a horse, sent out the 4th parcel.
I have a little understanding now that the postman's approach is to ensure that only 3 packages are sent and not confirmed at a time.
After a while, county government suddenly came to 3 horses, brought the confirmation of the 2,3,4 package.
The postman said: "It seems that your luck is still good, I am sending the 5,6,7" to say that he left the sand, and start the time again.
The confirmation of package 5th came soon, and the postman sent out the number 8th, so that the package that had been sent but not confirmed was three.
Now the 6,7,8 package has been sent out, but the confirmation of the 6th package has been delayed, I was very worried.
At this time, the hourglass leaks, I am uneasy to see the postman.
He did not care: "Oops, timed out, it is possible that the carriage of 6th parcel of the horse was eaten by the tiger, county government confiscated."
"How to do it," I asked anxiously.
"We had to start the resend from package 6th, package 6th is just a leg of the cupboard, go back to your boss and say, do a cabinet leg, make sure to make the same as before." ”
I asked him, "What about the 7 and 8th parcels?" County government, do you copy? ”
"We don't know yet, and if they do, they will be saved for the time being." If it is confiscated, it will still have to be re-sent like parcel 6th. ”
My endurance to the limit, I really want to jump up and beat the postman a meal.
Calm down, I thought to say: "No, why did you send 3 parcels, you can not send a waiting to confirm one?" I'm going to sue you. ”
The postman said: "Whatever you, anyway you are not win, this is the cabinet of the first auxiliary adults sure, we use called sliding window protocol, if the window n=1, that is, a waiting to confirm one, so it is too slow, I this postman can not always be occupied by you, we put the value of n larger, such as n=3, is to be Line like doing things, while sending parcels, while receiving confirmation, so faster. ”
No way, had to go back to the boss to do the cabinet legs, which delayed a lot of time.
The postman sent out the parcel number 6th and re-clocked it again.
The confirmation of Package No. 6th is still not received! No confirmation of number 7th was received, but the confirmation of package 8th was received first!
The postman said: "Well, good, 6, 7th confirmed package is lost on the road, it doesn't matter, as long as county government said received 8th package, implied meaning is 6, 7th have received." Otherwise, they won't make confirmation of number 8th. ”
Next, send 9, 10th package, this time is OK, finally did not lose, at last the whole cabinet sent out.
Neixiang County ya also put the cabinet to assemble up. My task is finally finished.
Later I learned that county government actually received the 6th package, only their confirmation package sent to the capital lost, we confiscated, causing us to re-send a copy.
I understand. This so-called TCP, is nothing more than the unreliable horse transport based on the establishment of a reliable delivery method, basically is the failure of the re-hair, suffering or the bottom of our people.
I paid 22 silver to the postman for the fee, pulled the wagon, and didn't go back.
Only to hear the postman shouting in the back: "Welcome again, the cabinet of the first assistant is studying the new agreement, next time must come to try ah." ”
I ignored him, because I never want to come to this place again!
"Reprint" The large Ming Dynasty postman of TCP/IP