Java network programming concepts

 

NDIS: Network communication between computers connected to the network, such as QQ chat, file transfer.

 

 

ip: uniquely identifies a computer on the network

Check your phone ip: windows are ipconfig, linux is ifconfig

 

 

ipv4: 4 integers between 0-255, separated by dots, such as 192.168.1.1, about 4.2 billion addresses has been depleted in early 2011

 

ipv6: 8 groups of 4 hexadecimal numbers, separated by colons, for example ABCD: 0000: 2C4F: 0000: 0000: EF01: 2345: 6789

If a group is all 0, the default, the above address can be abbreviated as ABCD :: 2C4F: 0000: 0000: ef01: 2345: 6789, but only once the default (can appear only once: :) 

It can also be abbreviated as ABCD: 0000: 2C4F :: ef01: 2345: 6789, the default group 2 0

 

 

Local loop address: 127.0.0.1 (ipv4) :: 1 (ipv6)

Broadcast address: 255.255.255.255

 

 

Port number: uniquely identifies a program on one machine. ip determine which machine, port determine which program on this machine.

Range: 0-65535, to make use of more than 1024 port number 1024 are the basic OS used.

 

 

protocol:

  • TCP connection-oriented (3-way handshake), data security (need each other to exist, and has started to communicate), because to ensure transport safety, the transmission speed is slightly slower, to distinguish between the client and the server.
  • UDP connectionless, unsecured data (send data directly, regardless of whether the other exists, has started), fast, does not distinguish between the client, the server

Three-way handshake: the client Xianxiang server initiated the request, the server responds to the request, the client data transfer to the server.

 

 

Socket (socket):

ip: port forms by the ip, port composition (unique identifier).

Both ends of the communication of the socket, in fact, the network communication between the communication socket, between the two data streams transmitted through socket IO.

This is also the principle of network communications.

 

Guess you like

Origin www.cnblogs.com/chy18883701161/p/12554612.html