socket, don’t make a mistake For the server, you need to use the ServerSocket class. One of the constructors is server = new ServerSocket(port); Then call Socket client = server.accept(); when there is a new socket connection, you can return a client's socket connection object. If you don’t understand, you can ask
socket, don’t make a mistake
For the server, you need to use the ServerSocket class. One of the constructors is
server = new ServerSocket(port);
Then call Socket client = server.accept(); when there is a new socket connection, you can return a client's socket connection object. If you don’t understand, you can ask
Publishing means that the client can access it through the port,
server = new ServerSocket(port) means publishing