简体   繁体   中英

What does protocols mean in a computer system

We know that a protocol is a rule that computers follow so that they can effectively communicate with each other. But when we talk about rules, the question arises, what are these rules.?

For example, let's take the http protocol. What rules does it have on which computer follows?

I will now list some of the rules, and if it's wrong, please correct me and tell me whether they are rules in general or not.

For example http protocol... this protocol dictates such rules.. 1.determines on which method (GET, POST and then) the request will be sent. 2. on which host the request will be sent. 3. what format will be requested file. 4.which data cookie will be sent to the server 5. on which port the request will be sent etc....

when we talk about TCP protocol... this protocol dictates such rules.. 1.It records on which port the data will be sent. 2.data is divided into packets and a number is assigned to each packet so that the computer that receives the data will correctly arrange the packets. 3. When a packet is lost on the road, it has rules to send the request again to get the lost packet. etc....

when we talk about the IP protocol... this protocol dictates such rules.. 1.This protocol provides source and destination ip addresses and decides on which routers packets should go. routers work at this level. etc....

Please confirm if I understand correctly, do these rules represent a protocols or not??

Communication protocols need to define everything needed for two separate software developers to write two separate pieces of software that are able to communicate to each other using that protocol.

This includes things like the context in which the protocol is expected to operate, the various protocol states (eg the TCP state machine ), the expected behavior in each state, how transitions between the states work, how messages are encoded, and what is the precise meaning of each message is.

Your examples are on the right track, but I suggest you skim at lest some of the initial RFCs for the protocol you mentioned like IP and TCP . They're fairly readable and will give you a better idea of what's need to define a protocol.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM