52ky 发表于 2022-9-10 17:15:35

socket

所谓socket一般也称作套接字,使用程序一般通过套接字向网络发出恳求或许应对网络恳求。以J2SDK-1.3为例,Socket和ServerSocket类库位于java包中。ServerSocket用于服务器端,Socket是建立网络连接时使用的。在连接成功时,使用程序两头都会生成一个Socket实例,操作这个实例,终结所需的会话。用于一个网络连接来说,套接字是对等的,并没有差别,不因为在服务器端或在客户端而生成不同等级。不管是Socket仍是ServerSocket它们的办公都是通过SocketImpl类及其子类终结的。

(The so-called socket is generally also called a socket, and the application program generally sends a request to the network through the socket or responds to the network request. Take J2SDK-1.3 as an example, the Socket and ServerSocket class libraries are located in the java package. ServerSocket is used on the server side, and Socket is used when establishing a network connection. When the connection is successful, both ends of the program will generate a Socket instance, operate this instance, and terminate the required session. For a network connection, sockets are peer-to-peer, and there is no difference, and no different levels are generated because of the server side or the client side. Whether it is Socket or ServerSocket, their office is terminated through the SocketImpl class and its subclasses.)




页: [1]
查看完整版本: socket