Current location - Plastic Surgery and Aesthetics Network - Clothing company - OSI model and protocol corresponding to qq sending messages.
OSI model and protocol corresponding to qq sending messages.
First of all, we should make it clear that the tcp or udp protocol used by QQ is the third layer (network layer) applied in the OSI model. Take you chatting with Party A and sending him an "ah" as an example.

Premise. Both parties have logged into qq, established connection through socket, and used tcp protocol to occupy a port in the operating system for communication. Of course, the necessary hardware is computer hardware, and I only emphasize the network card here;

1. You sent a word, and qq software converted it into a byte stream;

2. Packed the byte stream layer by layer through the network card of the operating system port = and sent it to the network card of the target computer that established the connection before, and then the target computer unpacked it layer by layer through the OSI model to convert the byte stream into a string that you can see;

To sum up:

All you care about is the third layer, the physical layer (network card, network, etc. ) and data link layer. The operating system and tcp/ip protocol family have been prepared for you, and Socket is needed for coding. I hope you can see it clearly and I can see it clearly.