Berkeley sockets is an application programming interface (API) for Internet sockets and Unix domain sockets, used for inter-process communication (IPC).
BSD sockets cknowledging the first implementation in the Berkeley Software Distribution.
插座桥接应用层与传输层
----------Server--------
插排 ServerSocket ss = new ServerSocket(int port);
插口插线Socket s = ss.accept();
插口拔线 s.close();
插排销毁 ss.close();
----------Client--------
插口插线 Socket s = new Socket(String host, int port);
插口拔线 s.cloes();
服务器插座的插口供多个客户端使用
一个端口对应一个服务器插座
通讯结束后需要拔掉插座,否则插口被占用