Java programming_ socket_ Socket_ Network programming
•
Java
For the server, use ServerSocket to listen to the specified port. The port can be specified at will (since ports below 1024 are usually reserved ports,
The client uses the socket to send a connection request to a port of a server on the network. Once the connection is successful, open the session; After the session is complete,
2. Realize single thread chat room
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码