📜  服务器实现 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:15.079000             🧑  作者: Mango

代码示例1
The server is the program that starts first and waits for incoming connections. Implementing a server consists of six basic steps:

    Create a ServerSocket object.

    Create a Socket object from the ServerSocket.

    Create an input stream to read input from the client.

    Create an output stream that can be used to send information back to the client.

    Do I/O with input and output streams.

    Close the Socket when done.