使用网络通信协议,让运行在不同计算机上的程序,进行数据传输

java.net

软件架构:C/S、B/S

三要素

1. IP 地址

4组 32位地址长度

点分十进制 0-255

8组 128位地址长度

冒分十六进制法

192.168.x.x 局域网

172.0.0.1 localhost 本地回环地址

InetAddress address = InetAddress.*getByName*("KmoonPC");

2. Port 端口号

0-65535

只能使用 1024 以上的端口

3. Protocol 协议