Network programming:
b/S Browser/server browser server
C/S Client/server client Server
TCP/IP N computers comply with protocols and specifications to generate a communication =====> network
Original ip===> 00000000.00000000.00000000.00000000 Pure digit 32 bit, inconvenient memory
IPv4 ===> 255.255.255.255
IPv6 ===> is a 128-bit composed of numbers, Alphabet symbols! It's 4 times times the IPv4.
Ipconfig querying the IP address of this machine
Ping Localhost/127.0.0.1/::1 Testing the connectivity of this machine
119.75.213.61 If this is Baidu's website, we have to enter this value every day, not remember
Www.baidu.com is easy for us to remember
DNS Domain name Resolution!
01. Convert IP address to domain name
02. Resolve the domain name to an IP address
Port number value is 0-65535
But the port number between 0-1024 is reserved by the system, not recommended!
1 a computer
2. All computers meet the TCP/IP protocol
3. Know each other's IP and port number
4. Start communication
Network server
Mail server
Web server
Cache server
is to provide users with services of one or n computers!
TCP protocol: (transmisstion Control Protocol) transmission protocol!
1. Connection-oriented, reliable
2. Security
3. Transmission Communication protocol based on Byte stream
4. Slow transmission speed
UDP protocol: (User Datagram Protocol) Subscriber Datagram Protocol!
1. For non-connected
2. Unsafe
3. The client and server do not establish a connection prior to transmitting data
4. Fast transmission speed
Java Network Programming